Question: [MACS] IndexError: list index out of range
0
gravatar for bio_zhangxl
4.3 years ago by
bio_zhangxl10
China
bio_zhangxl10 wrote:

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~

software error macs • 2.6k views
ADD COMMENTlink modified 4.2 years ago • written 4.3 years ago by bio_zhangxl10
1
gravatar for geek_y
4.3 years ago by
geek_y9.4k
Barcelona/CRG/London/Imperial
geek_y9.4k wrote:

line 683 of Parser.py is 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.

 

ADD COMMENTlink modified 4.3 years ago • written 4.3 years ago by geek_y9.4k
0
gravatar for bio_zhangxl
4.3 years ago by
bio_zhangxl10
China
bio_zhangxl10 wrote:

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.

ADD COMMENTlink written 4.3 years ago by bio_zhangxl10
0
gravatar for bio_zhangxl
4.3 years ago by
bio_zhangxl10
China
bio_zhangxl10 wrote:

I tried to translate sam to bam with samtool before,but there is also a error when I use samtool

ADD COMMENTlink written 4.3 years ago by bio_zhangxl10

Try to re-run bowtie2

bowtie2 -p 8 -x genome -U SRR948816.fastq -S SRR948816.sam
bowtie2 -p 8 -x genome -U SRR948825_input.fastq -S SRR948825.sam
ADD REPLYlink written 4.3 years ago by geek_y9.4k
0
gravatar for bio_zhangxl
4.2 years ago by
bio_zhangxl10
China
bio_zhangxl10 wrote:

Thank you so much.

I try re-run bowtie2 as you said,there is no error now .Can you tell me why ?

 

 

ADD COMMENTlink written 4.2 years ago by bio_zhangxl10

The command that you were using is not correct.

ADD REPLYlink written 4.2 years ago by geek_y9.4k
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 2.3.0
Traffic: 1279 users visited in the last hour