Module Expr Str Import alias Import alias ImportFrom alias FunctionDef arguments args NameParam NameParam NameParam NameParam defaults AttributeLoad NameLoad attr NameLoad body Assign NameStore Dict If UnaryOpNot NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str For NameStore Call NameLoad NameLoad body If CompareEq SubscriptLoad NameLoad Index Num Str body Continue Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Assign SubscriptStore NameLoad Index SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num If UnaryOpNot NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str For NameStore Call NameLoad NameLoad body TryExcept body Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str If CompareGt NameLoad Num body If CompareEq NameLoad Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Continue Assign NameStore SubscriptLoad NameLoad Slice NameLoad Assign NameStore SubscriptLoad NameLoad Slice UnaryOpUSub NameLoad Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Assign NameStore NameLoad For TupleStore NameStore NameStore ListComp Call AttributeLoad NameLoad attr Str comprehension NameStore ListComp Call AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad NameLoad attr Str NameLoad body If BoolOpAnd CompareEq SubscriptLoad NameLoad Index Num Str CompareEq SubscriptLoad NameLoad Index Num Str body Assign NameStore SubscriptLoad NameLoad Slice Num Num If CompareEq NameLoad Str body Assign NameStore NameLoad If CompareNotEq SubscriptLoad NameLoad Index Num Str body Assign NameStore BinOpMod Str NameLoad If CompareIn NameLoad NameLoad body Assign NameStore BinOpMod Str TupleLoad NameLoad SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr ListLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Str handlers ExceptHandler body Import alias Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults NameLoad body If NameLoad body Print NameLoad Print NameLoad Print Str Expr Call AttributeLoad NameLoad attr Num decorator_list If CompareEq NameLoad Str body Assign NameStore NameLoad Assign NameStore NameLoad For NameStore SubscriptLoad AttributeLoad NameLoad attr Slice Num body If CompareEq NameLoad Str body Expr Call NameLoad If BoolOpAnd UnaryOpNot NameLoad BoolOpOr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad CompareEq NameLoad Str body Assign NameStore NameLoad orelse If BoolOpAnd UnaryOpNot NameLoad BoolOpOr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad CompareEq NameLoad Str body Assign NameStore NameLoad If BoolOpOr UnaryOpNot NameLoad UnaryOpNot NameLoad body Expr Call NameLoad If BoolOpAnd CompareEq NameLoad Str CompareEq NameLoad Str body Expr Call NameLoad Str Expr Call NameLoad NameLoad NameLoad
N/A N/A Adds isoform annotations to a GTF file (isoforms)

This adds isoform annotations based upon the KnownGene annotations from the
UCSC Genome Browser. Isoforms are taken from the knownIsoform table. This
table must be downloaded from the UCSC Genome Browser.

The isoforms file should be in the following format:

isoform_id {tab} transcript_id

Where all transcripts that are isoforms of the same gene will have the same
isoform_id value.

This will add the following attributes:
    isoform_id (isoform cluster id)
 N/A sys N/A os ngsutils.support gzip_reader gtf_add_isoform N/A N/A gtf iso out quiet N/A N/A sys stdout False N/A N/A isoforms N/A N/A N/A quiet N/A N/A N/A N/A N/A sys stderr write Reading isoforms...
 N/A line N/A gzip_reader iso N/A N/A N/A N/A line N/A 0 # N/A N/A N/A cols N/A N/A N/A N/A line rstrip split N/A N/A isoforms N/A N/A cols N/A 1 N/A cols N/A 0 N/A N/A quiet N/A N/A N/A N/A N/A sys stderr write Reading/Writing GTF...
 N/A line N/A gzip_reader gtf N/A N/A N/A N/A comment None N/A idx N/A N/A line find # N/A N/A idx -1 N/A N/A N/A idx 0 N/A N/A N/A N/A N/A sys stdout write line N/A N/A comment N/A line N/A idx N/A line N/A line N/A N/A idx N/A N/A chrom source feature start end score strand frame attrs N/A N/A N/A N/A line rstrip split N/A transcript_id None N/A N/A key val N/A N/A N/A x split N/A x N/A N/A N/A x strip N/A x N/A N/A attrs split ; x N/A N/A N/A N/A N/A val N/A 0 " N/A N/A val N/A -1 " N/A N/A val N/A val N/A 1 -1 N/A N/A key transcript_id N/A N/A transcript_id val N/A N/A N/A attrs N/A -1 ; N/A N/A attrs N/A %s; attrs N/A N/A transcript_id isoforms N/A N/A attrs N/A %s isoform_id "%s"; N/A attrs N/A isoforms N/A transcript_id N/A N/A N/A out write N/A N/A join N/A chrom source feature start end score strand frame attrs N/A comment N/A N/A N/A N/A out write N/A 	%s comment N/A N/A N/A out write N/A N/A N/A N/A traceback N/A N/A N/A N/A sys stderr write N/A Error parsing line:
%s
 line N/A N/A N/A traceback print_exc N/A N/A N/A sys exit 1 N/A usage N/A N/A msg N/A None N/A N/A msg N/A N/A msg N/A __doc__ N/A Usage: gtfutils add_isoform filename.gtf knownIsoform.txt N/A N/A N/A sys exit 1 N/A N/A N/A __name__ __main__ N/A N/A gtf None N/A iso None N/A arg N/A N/A sys argv N/A 1 N/A N/A N/A arg -h N/A N/A N/A usage N/A N/A N/A gtf N/A N/A N/A N/A os path exists arg N/A arg - N/A N/A gtf arg N/A N/A N/A N/A iso N/A N/A N/A N/A os path exists arg N/A arg - N/A N/A iso arg N/A N/A N/A gtf N/A iso N/A N/A N/A usage N/A N/A N/A gtf - N/A iso - N/A N/A N/A usage Both GTF and Isoform files can not be from stdin N/A N/A gtf_add_isoform gtf iso