r3fang / SnapATAC

Analysis Pipeline for Single Cell ATAC-seq
GNU General Public License v3.0
301 stars 125 forks source link

seqnames in peaks / homer analysis #129

Open mej54 opened 4 years ago

mej54 commented 4 years ago

Hi,

I'm trying to run Homer motif analysis on the peaks identified in my clusters, but it's giving an error because no knownResults.txt file is created. I've also noticed that my GenomicRanges object for the peaks labels the chromosome names with a b'' prefix (i.e. b'chr1'). Do you know why this b prefix is added, and whether that might be causing the issue with Homer?

Thanks!

r3fang commented 4 years ago

Hi Molly,

This is caused by a version issue between python 2 and python 3. I will try to fix it this or next week. I think it will affect the homer analysis. For a temp solution, you can remove the letter 'b' in the GenomicRanges object

Best, Rongxin

hjack123 commented 4 years ago

pls let us know when it's fixed. I had the same problem but fixed it by removing 'b'

shengxin321 commented 4 years ago

May I ask how to remove 'b' in the GenomicRanges object? Every time I used the renameSeqlevels, then I used "->" to assign the value to the x.sp@peak. However, it show an error like "object of type 'S4' is not subsettable".

hjack123 commented 4 years ago

sed 's/word1/word2/g' input.file

dskhanirfan commented 4 years ago

Hi r3fang I ran into same problem, I got the following error using Homer Error in file(file, "rt") : cannot open the connection Calls: runHomer -> runHomer.default -> read.csv -> read.table -> file In addition: Warning message: In file(file, "rt") : cannot open file '/scratch/project_2001539/trial/results/knownResults.txt': No such file or directory Execution halted

btimran commented 4 years ago

I ran HOMER, In the results folder (C5) a target (target_randomnumber) file is created with b' prefix. Error occurs -> knownResults.txt No such file or directory. If I remove the b prefix from target file, How can knownResults.txt file be generated after changing the prefix? because C5 folder is generated at runtime.

yxiao832 commented 4 years ago

I have a similar question. I am using python2.7.14. My x.sp@peak is like the following: GRanges object with 6 ranges and 1 metadata column: seqnames ranges strand | name

| [1] chr1 3119704-3119969 * | chr1:3119704-3119969 [2] chr1 3121530-3121778 * | chr1:3121530-3121778 [3] chr1 3416344-3416603 * | chr1:3416344-3416603 [4] chr1 3423312-3423679 * | chr1:3423312-3423679 [5] chr1 3430785-3430985 * | chr1:3430785-3430985 [6] chr1 3477942-3478156 * | chr1:3477942-3478156 but I still get the errors: Warning message in file(file, "rt"): “cannot open file './homer/C3/knownResults.txt': No such file or directory” Error in file(file, "rt"): cannot open the connection Thank you! Yang
ccruizm commented 4 years ago

Hello @r3fang,

I am having the same issue that others reported before. When I want to runHomer, it is not able to open the connection to the file on the specified folder. Do you know how we can fix it? thanks in advance

yxiao832 commented 4 years ago

I end up taking the peak files generated by SNAPatac and run homer by command line. @ccruizm

gengbaobao commented 8 months ago

Hello, the problem still exists. I use python3.