Question: TSS plot with htseq 0.6.1 gives segmentation fault
gravatar for jellevandewege
5.3 years ago by
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 ( I tired running it on a smaller file and this gave me no error...

bamfile = HTSeq.BAM_Reader( "" )
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 )        

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
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

or you can use CGAT tool

or ngsplot


ADD COMMENTlink written 5.3 years ago by Ming Tang2.5k
Please log in to add an answer.


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