Question: SummarizedExperiments error for reading the data
0
gravatar for rsong
4 months ago by
rsong0
rsong0 wrote:

Dear friends,

I am new to R and trying to combine two peak files into one file for ChromVAR using SummarizedExperiments in R. I set up the right working directory and found this error.

> assayNames(E16WTc_nPN_peakschr.narrowPeak,P0H2_nPN_peakschr.narrowPeak)
Error in assayNames(E16WTc_nPN_peakschr.narrowPeak, P0H2_nPN_peakschr.narrowPeak) : 
  object 'E16WTc_nPN_peakschr.narrowPeak' not found

The files are there, can anyone help please? Thank you very much.

Have a great day.

Renfang

software error • 103 views
ADD COMMENTlink modified 4 months ago by James W. MacDonald52k • written 4 months ago by rsong0
Answer: SummarizedExperiments error for reading the data
0
gravatar for James W. MacDonald
4 months ago by
United States
James W. MacDonald52k wrote:

Whenever you get an error that includes

object <some object name> not found

That means you have told R to do something with an object that is supposed to be in your global environment, and it isn't there. If those are supposed to be file names, then you have to enclose in quotes, or else R will think you want an existing object.

ADD COMMENTlink written 4 months ago by James W. MacDonald52k

Thank you very much James. I add the quotes and the error is gone and I am still trying to figure out how to use the SummarizedExperiments in R. I run the library and read two files and do you have the script of it? I run the script and it does not run through so I am thinking I misunderstood the script. do you know how to run SummarizedExperiments or RangedSummarizedExperiments? Thank you so much.

Renfang

ADD REPLYlink written 4 months ago by rsong0
1

You are being unnecessarily mysterious. What script? Why do you think I would know what 'the script of it' might be? There isn't really something that I would call 'run SummarizedExperiments'. You can create them, and use them for various things, but I have no idea what you are after. You appear to want to do something with the chromVAR package, with which I am unfamiliar. There is a vignette for the package that you could read, as well as the help pages.

If you have a specific thing you are trying to do, you need to clearly state what you are trying to do, what you have tried, and provide code that shows any errors.

You should also understand that things like R and Bioconductor are free to download, but they are not really free to use. Instead you have to pay with your own time and efforts to learn about the packages you want to use, as well as the basics of using R, not to mention having sufficient understanding of statistics required to know if you are doing the right thing or not. None of this is simple, and there is no substitute for your own time and effort to learn. While you may find people on support sites like this who will give you answers to simple and direct questions, you won't be able to rely on the support sites to help you get up to speed. That's on you.

If you have the time and inclination to learn all this stuff, it can be useful. For many (most?) people, it's not worth the time and effort, and it's probably faster and better to find someone local who can help.

ADD REPLYlink written 4 months ago by James W. MacDonald52k

Thank you so much for the comments. I did know the importance to make effort to study. It was frustrated that I could not figure out the problem by trying days.

> peakfile <- readNarrowpeaks("E16WTc_nPN_peakschr.narrowPeak", width = 500, non_overlapping = TRUE)
Parsed with column specification:
cols(
  chr = col_character(),
  start = col_double(),
  end = col_double(),
  name = col_character(),
  score = col_double(),
  strand = col_character(),
  fc = col_double(),
  pval = col_double(),
  qval = col_double(),
  summit = col_double()
)
> peaks <- getPeaks(peakfile)
Error: `file` must be a string, raw vector or a connection.
ADD REPLYlink written 4 months ago by rsong0

Why do you think the results from readNarrowpeaks is useful as input to getPeaks? I think the help pages for both functions are relatively clear - readNarrowpeaks is for reading in data from a MACS narrowPeaks file, and getPeaks is for reading in a BED file.

I can't find any documentation, or anything in the vignette that would lead you to think that you should use readNarrowpeaks to generate something that you would use as input for getPeaks. Can you point out where you got that idea?

ADD REPLYlink written 4 months ago by James W. MacDonald52k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 216 users visited in the last hour