Hi
I did not use BoolNet package, but from documentation it seems that function
getAttractor requires object of class BooleanNetwork. However your object New
Text Document1 has class
[1] "tbl_df" "tbl" "data.frame"
This is probably the reason for error. But for the getAttractors you use other
file (net), and we do not have faintest idea about it, so it is hard to be
precise.
Check e.g. how cellcycle data is organised and check your net object if it has
similar structure.
Cheers
Petr
> -----Original Message-----
> From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Priya
> Arasu
> Sent: Tuesday, November 8, 2016 9:33 AM
> To: r-help at r-project.org; jdnewmil at dcn.davis.ca.us
> Subject: Re: [R] Help-Text file
>
> Hi,
> I have taken Mr.Jeff's suggestions in producing a reproducible
example
> and edited my question again. Kindly someone in the mailing list, help to
> solve the problem, which I have mentioned in the below mail Thank youPriya
>
>
> Dear Mr. Jeff Newmiller,
> Thank you. I have gone through the
links that you have
> sent me to produce reproducible example. I will try to explain the problem
> clearly this time.
>
> I have been using Boolnet package, to simulate interaction between certain
> genes. I have a problem after importing the text file
> (New_Text_Document_1) in R and start doing the attractor analysis in
> Boolnet. I have pasted the steps below, when I give the command
> "getAttractors" for doing attractor analysis, I get the error
(highlighted red
> and italicized).
>
> > library("BoolNet", lib.loc="~/R/win-library/3.3")
> > library(readr)#Imported txt file
> > New_Text_Document_1 <- read_csv("C:/Users/Priya/Desktop/New
Text
> > Document-1.txt")
> Parsed with column specification:
> cols(
> Targets = col_character(),
> factors = col_character()
> )
> > View(New_Text_Document_1)
> > net <- loadNetwork("C:/Users/Priya/Desktop/New Text
Document-1.txt")
> > #loaded the txt file as network (net) for analysis attr <-
> > getAttractors(net, type="asynchronous") # attractor analysis
for the
> > txt file
> Error in matrix(nrow = n, ncol = length(network$genes)) :
> invalid 'nrow' value (too large or NA) In addition: Warning
message:
> In matrix(nrow = n, ncol = length(network$genes)) :
> NAs introduced by coercion to integer range
>
>
> Using dput, I have pasted the data (New_Text_Document_1), which I have
> imported for doing attractor analysis.I have also attached the
> New_Text_Document_1 along with this mail. I didn't get any reply from
the
> publishers of Boolnet package, so Kindly help. Have anyone come across this
> error and how do I fix this problem?
>
>
> dput(New_Text_Document_1)
> New_Text_Document_1 <- structure(list(Targets = c("DISC1",
"MITF",
> "GATA1", "TAL1", "EZH2", "AR",
"TCF3", "miR124", "miR377", "let7b",
"let7a",
> "let7d", "PCM1", "miR33a", "EGR1",
"SALL4", "POU3F2", "THAP11",
> "HCFC1","ZFP281", "WT1", "SOX2",
"CUX1", "SIN3B", "KDM5B", "HOXB4",
> "ELK1", "FLI1", "HNF4A", "RUNX1",
"BBS4", "miR432", "miR382", "miR127",
> "E2F1", "TFAP2A", "EOMES", "GABP"),
> factors = c("(!miR124 & !let7b & !let7a & !let7d) | (PCM1
& BBS4) | (MITF |
> GATA1 | TAL1 | EZH2 | AR | TCF3 | HNF4A | RUNX1)",
> "(MITF)", "(GATA1)", "(!miR377) | (TAL1)",
"(!miR124) | (EZH2)",
> "(!miR124) | (AR)", "(!miR124) | (TCF3)",
"(EGR1)", "(miR377)",
> "(let7b)", "(let7a)", "(let7d)", "(!
miR33a) | (DISC1 & BBS4) | (EGR1 | SALL4 |
> POU3F2 | THAP11 | HCFC1 | ZFP281 | WT1 | SOX2 | CUX1 | SIN3B | KDM5B |
> HOXB4 | ELK1 | TCF3 | FLI1 | HNF4A | RUNX1 | MITF)",
"(miR33a)", "(!
> miR124) | (EGR1)", "(SALL4)", "(POU3F2)",
"(THAP11)","(HCFC1)", "(ZFP281)",
> "(WT1)", "(SOX2)", "(CUX1)",
"(SIN3B)",
> "(KDM5B)", "(HOXB4)", "(ELK1)",
"(FLI1)", "(HNF4A)", "(RUNX1)",
> "(! miR432 & ! miR382 & ! miR127 & ! miR377) | (DISC1
& PCM1) | (E2F1 |
> GATA1 | FLI1 | MITF | ELK1 | CUX1 | KDM5B | SIN3B) | GABP | EOMES |
> TFAP2A)", "(miR432)", "(miR382)",
"(miR127)", "(! let7a) | (E2F1)",
> "(TFAP2A)", "(EOMES)", "(GABP)")),
> class = c("tbl_df", "tbl", "data.frame"),
> row.names = c(NA, -38L), .
> Names = c("Targets", "factors"),
> spec = structure(list(cols = structure(list(Targets = structure(list(),
class > c("collector_character","collector")),
> factors = structure(list(), class = c("collector_character",
"collector"))), .
> Names = c("Targets", "factors")),
> default = structure(list(),
> class = c("collector_guess", "collector"))), .
> Names = c("cols", "default"), class =
"col_spec"))
>
> Regards
> Priya
>
>
>
> On Saturday, 5 November 2016 10:28 PM, Jeff Newmiller
> <jdnewmil at dcn.davis.ca.us> wrote:
>
>
> Sorry, but this request is quite hard to understand... you are basically
> directing your question at an incredibly narrow set of people who happen to
> have combined your kind of data read in the way you read it in with your
kind
> of analysis algorithms while telling us almost nothing about how you did
> those things.
>
> Please read the Posting Guide mentioned in the footer of every posting on
> this list and provide a reproducible example [1][2]. If the problem is in
your
> use of R then someone here will be able to help. If your problem is inside
a
> contributed package then you may need the assistance of the package
> maintainer, but they will also need a reproducible example so your effort
will
> not be in vain. Also, the act of creating a RE often leads you to your own
> solution even without getting outside help.
>
> [1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-
> reproducible-example
>
> [2] http://adv-r.had.co.nz/Reproducibility.html
>
> --
> Sent from my phone. Please excuse my brevity.
>
> On November 4, 2016 10:28:48 PM PDT, Priya Arasu via R-help <r-help at
r-
> project.org> wrote:
> >Hi,
> > I am using R 3.3.1 in R studio version 1.0.44 (Windows10, 64 bit
> >system). I could import text file with Boolean rules, but when I start
> >doing analysis in R, I get the error: I have been trying to do
> >attractor analysis using R package Boolnet, using the command: attr
<-
> >getAttractors(net, type="asynchronous"). This command throws
up the
> >below error:
> >
> >Error in matrix(nrow = n, ncol = length(network$genes)) :
> > invalid 'nrow' value (too large or NA)
> >In addition: Warning message:
> >In matrix(nrow = n, ncol = length(network$genes)) :
> > NAs introduced by coercion to integer range
> >
> >
> > Have anyone come across this error?. I have attached the text file
> >with Boolean rules. Pls find it. Any suggestions or ideas, would be of
> >great help
> >Thank you
> >Priya
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>------------------------------------------------------------------------
> >
> >______________________________________________
> >R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> >https://stat.ethz.ch/mailman/listinfo/r-help
> >PLEASE do read the posting guide
> >http://www.R-project.org/posting-guide.html
> >and provide commented, minimal, self-contained, reproducible code.
>
>
>
>
>
>
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.
________________________________
Tento e-mail a jak?koliv k n?mu p?ipojen? dokumenty jsou d?v?rn? a jsou ur?eny
pouze jeho adres?t?m.
Jestli?e jste obdr?el(a) tento e-mail omylem, informujte laskav? neprodlen? jeho
odes?latele. Obsah tohoto emailu i s p??lohami a jeho kopie vyma?te ze sv?ho
syst?mu.
Nejste-li zam??len?m adres?tem tohoto emailu, nejste opr?vn?ni tento email
jakkoliv u??vat, roz?i?ovat, kop?rovat ?i zve?ej?ovat.
Odes?latel e-mailu neodpov?d? za eventu?ln? ?kodu zp?sobenou modifikacemi ?i
zpo?d?n?m p?enosu e-mailu.
V p??pad?, ?e je tento e-mail sou??st? obchodn?ho jedn?n?:
- vyhrazuje si odes?latel pr?vo ukon?it kdykoliv jedn?n? o uzav?en? smlouvy, a
to z jak?hokoliv d?vodu i bez uveden? d?vodu.
- a obsahuje-li nab?dku, je adres?t opr?vn?n nab?dku bezodkladn? p?ijmout;
Odes?latel tohoto e-mailu (nab?dky) vylu?uje p?ijet? nab?dky ze strany p??jemce
s dodatkem ?i odchylkou.
- trv? odes?latel na tom, ?e p??slu?n? smlouva je uzav?ena teprve v?slovn?m
dosa?en?m shody na v?ech jej?ch n?le?itostech.
- odes?latel tohoto emailu informuje, ?e nen? opr?vn?n uzav?rat za spole?nost
??dn? smlouvy s v?jimkou p??pad?, kdy k tomu byl p?semn? zmocn?n nebo p?semn?
pov??en a takov? pov??en? nebo pln? moc byly adres?tovi tohoto emailu p??padn?
osob?, kterou adres?t zastupuje, p?edlo?eny nebo jejich existence je adres?tovi
?i osob? j?m zastoupen? zn?m?.
This e-mail and any documents attached to it may be confidential and are
intended only for its intended recipients.
If you received this e-mail by mistake, please immediately inform its sender.
Delete the contents of this e-mail with all attachments and its copies from your
system.
If you are not the intended recipient of this e-mail, you are not authorized to
use, disseminate, copy or disclose this e-mail in any manner.
The sender of this e-mail shall not be liable for any possible damage caused by
modifications of the e-mail or by delay with transfer of the email.
In case that this e-mail forms part of business dealings:
- the sender reserves the right to end negotiations about entering into a
contract in any time, for any reason, and without stating any reasoning.
- if the e-mail contains an offer, the recipient is entitled to immediately
accept such offer; The sender of this e-mail (offer) excludes any acceptance of
the offer on the part of the recipient containing any amendment or variation.
- the sender insists on that the respective contract is concluded only upon an
express mutual agreement on all its aspects.
- the sender of this e-mail informs that he/she is not authorized to enter into
any contracts on behalf of the company except for cases in which he/she is
expressly authorized to do so in writing, and such authorization or power of
attorney is submitted to the recipient or the person represented by the
recipient, or the existence of such authorization is known to the recipient of
the person represented by the recipient.