Now I can not connect to the server. But I also do not know how to check the sam file, can you teach me ? I am a beginner.
[MACS] IndexError: list index out of range
histone modify data mapping to reference genome
.sra-->fastq
fastq-dump -I --split-3 SRR948816.sra
fastq--bowtie2--sam
bowtie2 -p 8 -x genome SRR948816.fastq > SRR948816.sam bowtie2 -p 8 -x genome SRR948825_input.fastq > SRR948825.sam
sam--MACS--peak
macs14 -t SRR948816.sam -c SRR948825.sam -g mm -m 5,30 -n SRR16 -B --call-subpeaks
warning:WARNING @ Sat, 17 Jan 2015 12:35:45: Treatment tags and Control tags are uneven! FDR may be wrong!
macs14 -t SRR948817.sam -c SRR948825.sam -g mm -m 5,30 -n SRR17 -B --call-subpeaks
error:
Traceback (most recent call last):
File "/usr/bin/macs14", line 366, in <module>
main()
File "/usr/bin/macs14", line 60, in main
(treat, control) = load_tag_files_options (options)
File "/usr/bin/macs14", line 338, in load_tag_files_options
treat = tp.build_fwtrack()
File "/usr/local/python-2.7.8/lib/python2.7/site-packages/MACS14/IO/Parser.py", line 666, in build_fwtrack
(chromosome,fpos,strand) = self.__fw_parse_line(thisline)
File "/usr/local/python-2.7.8/lib/python2.7/site-packages/MACS14/IO/Parser.py", line 683, in __fw_parse_line
thisref = thisfields[2]
IndexError: list index out of range
I want to know what dose the error mean~
• 5,728 views
•
link
1 answer
line 683 of Parser.pyis about parsing a sam file (SAMParser class).
Here is the code from MACS:
if thisline[0]=="@": return ("comment line",None,None) # header line started with '@' is skipped
thisfields = thisline.split('\t')
thistagname = thisfields[0] # name of tag
thisref = thisfields[2]
bwflag = int(thisfields[1])
its pretty straight forward that it will skip the header lines. Then split the sam records by tab and then stores the read name, chromosome name and flag information.
Can you check the sam file once using samtools whether it is complete and in proper format?
May be you can do sam --> bam --> sort --> any preprocessing --> index and run macs14 on final bam file.
• 0 views
•
link
Log in to answer this question.