Go Back   SEQanswers > Bioinformatics > Bioinformatics

Similar Threads
Thread Thread Starter Forum Replies Last Post
Updated How to convert .txt file to .bed .GFF or .BAR file format, forevermark4 Bioinformatics 2 06-30-2014 06:02 AM
GFF Annotation file AAWT Bioinformatics 3 12-12-2012 12:58 AM
Mixed read lengths in TopHat input file shurjo Bioinformatics 13 11-01-2012 05:46 AM
GFF file formatting naluru Bioinformatics 5 03-29-2011 12:21 PM
Convert segemehl *.map file into gff file. satheshsiva Bioinformatics 0 07-16-2010 05:40 AM

Thread Tools
Old 04-30-2018, 10:02 PM   #21
Junior Member
Location: Hong Kong

Join Date: Dec 2013
Posts: 5

Originally Posted by Simon Anders View Post
   for exon in transcripts[ transcript_id ]:
      # Each GenomicFeature object has a slot called 'iv', which is a
      # GenomicInterval object, which in turn contains slots such as
      # 'chrom', 'start', 'end', 'strand', 'length', etc., to describe
      # where the feature sits in the genome. We use 'length' here.
      transcript_length += exon.iv.length + 1
      # We add the 1 because this GFF file does no
   # Now, 'transcript_length' is the sum of the lengths of all the
   # transcripts exon.
   # Print this result, and also add the number of exons as (which is just the 
   # length of the list of exons for the transcript):
   print transcript_id, transcript_length, len( transcripts[ transcript_id ] )
So the iv object already accounted for the 1-based counting and end inclusive (information from the GFF_reader documentation of HTSeq) when calculating the length? So why do you need a +1 again? The documentation seems to want to explain it but somehow truncated.
zzta is offline   Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -8. The time now is 07:34 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO