[R] Help-Text file

Priya Arasu galaxie2485 at yahoo.co.in
Tue Nov 8 09:32:50 CET 2016

     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:
  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? 

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"))


    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:
>     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
>R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.




	[[alternative HTML version deleted]]

More information about the R-help mailing list