Question: TSS plot with htseq 0.6.1 gives segmentation fault
2
gravatar for jellevandewege
5.3 years ago by
Netherlands
jellevandewege90 wrote:

I am trying to run htseq with a bam and gtf file to create a TSS plot. After a while got a segmentation fault (core dumped). Im running the code shown in the example (http://www-huber.embl.de/users/anders/HTSeq/doc/tss.html#tss). I tired running it on a smaller file and this gave me no error...


bamfile = HTSeq.BAM_Reader( "s_8_1_I12-1251-03_DP-H3K27Ac.chipseq.hg19.srt.bam" )
gtffile = HTSeq.GFF_Reader( "hg19_IlluminaAnnotation_genes.gtf" )
coverage = HTSeq.GenomicArray( "auto", stranded=False, typecode="i" )


for almnt in bamfile:
    if almnt.aligned:
        coverage[ almnt.iv ] += 1


tsspos = set()
for feature in gtffile:
    if feature.type == "start_codon" and feature.:
        tsspos.add( feature.iv.start_d_as_pos )


p = HTSeq.GenomicPosition( "1", 145439814, "+" )


print p in tsspos

halfwinwidth = 3000
window = HTSeq.GenomicInterval( p.chrom, p.pos - halfwinwidth, p.pos + halfwinwidth, "." )


list( coverage[window] )  
wincvg = numpy.fromiter( coverage[window], dtype='i', count=2*halfwinwidth )
print wincvg


pyplot.plot( wincvg )
pyplot.show()        

I have no idea what is error means. It is a memory problem? or is there might be something wrong with the file?

 

 

tss plot chip-seq python htseq • 1.6k views
ADD COMMENTlink modified 5.3 years ago by Ming Tang2.5k • written 5.3 years ago by jellevandewege90

Did it create a core dump when it crashed? Also, is it possible that you ran out of memory (unlikely, but it's possible). Finally, are you able to run the full version line by line to determine at what point it breaks?

ADD REPLYlink written 5.3 years ago by Devon Ryan91k
2
gravatar for Ming Tang
5.3 years ago by
Ming Tang2.5k
Houston/MD Anderson Cancer Center
Ming Tang2.5k wrote:

I have a post using htseq to generate similar figures http://crazyhottommy.blogspot.com/2013/04/how-to-make-tss-plot-using-rna-seq-and.html

or you can use CGAT tool http://www.cgat.org/~andreas/documentation/cgat/recipes/nfkb_profile.html

https://github.com/CGATOxford/cgat

or ngsplot 

https://code.google.com/p/ngsplot/

 

ADD COMMENTlink written 5.3 years ago by Ming Tang2.5k
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: 1165 users visited in the last hour