SEQanswers

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 05:02 AM
GFF Annotation file AAWT Bioinformatics 3 12-11-2012 11:58 PM
Mixed read lengths in TopHat input file shurjo Bioinformatics 13 11-01-2012 04:46 AM
GFF file formatting naluru Bioinformatics 5 03-29-2011 11:21 AM
Convert segemehl *.map file into gff file. satheshsiva Bioinformatics 0 07-16-2010 04:40 AM

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

Join Date: Dec 2013
Posts: 5
Default

Quote:
Originally Posted by Simon Anders View Post
Code:
   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 ] )
Simon
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
Reply

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 11:32 PM.


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