sartorlab / methylSig

R package for DNA methylation analysis
17 stars 5 forks source link

methylSigReadData error #18

Closed shawpa closed 6 years ago

shawpa commented 6 years ago

I keep getting an error when I am trying to read my files into the methylSig program. Initially I found an error in my formatting of my input file that I corrected. I thought that was causing the issue but I am still getting the same error. This is the output when I try and read my files:

meth <- methylSigReadData(fileList,sample.ids=sample.id,assembly="hg19",treatment=treatment,context = "CpG", destranded=TRUE,minCount=10,maxCount=500,quiet=FALSE) Reading file (1/17) -- G20.ms.txt File (1/17) Sites with numCs + numTs < 95: 0 / 23341897 = 0 File (1/17) Destranding Error in chrom[location[forward]] = df$chr[forward] : NAs are not allowed in subscripted assignments

I am really at a loss at this point because I don't know what is meant by this error. I did check my files for "na" or "NA" and nothing popped up. It's a bit difficult because my input files are very large and I can't open them to take a look. I've attached a very small portion of my input file. The only thing I can see that is different between my file and the one shown in the vignette is that the last 2 columns stop after 2 decimals. Your assistance would be greatly appreciated.

G20.small.txt

shawpa commented 6 years ago

Please ignore. I was able to get around the error by using + instead of F to indicate the strand. I think it was reading it in as "false" and not "F".

rcavalcante commented 6 years ago

Hello,

I took a look at your file, and all the strand information is F, even when that's probably not true. For example

chr16.103247    chr16   103247  F   5   0   100
chr16.103248    chr16   103248  F   1   0   100

The second entry should be R or - because they are CpGs. Unless you're using other contexts, I suppose.

I'm concerned that even though the error is gone, your use of destranded isn't actually going to destrand your data because nothing is on the - strand.

Thanks, Raymond

shawpa commented 6 years ago

The pipeline I was using to get this data doesn't have what strand it is from. I was using the coverage files from the Bismark methylation extractor output to generate this file.

rcavalcante commented 6 years ago

Ah, yes, it has always annoyed me that strand isn't included in the coverage files. I'll go ahead and mark this as closed, unless you object.