Skip to content

fetch_cufflinks_transcripts

chrismit edited this page Feb 19, 2014 · 3 revisions

This is one example of how to get the GFFObjects corresponding to a transcript in cufflinks.

import pythomics.genomics.parsers as gp

gff = gpp.GFFReader('transcripts.gtf', preset='cufflinks')
for feature_name, feature in gff.get_features():
    #this is almost right, but not exactly since cufflinks puts in a 'transcript' type it will be wrong
    # print feature_name, feature.parts()
    #this addresses this
    print feature_name, [i for i in feature.parts() if i.type != 'transcript']

Clone this wiki locally