getzlab/rnaseqc

Collapse.py file

Closed this issue · 6 comments

@agraubert @joshua-gould @francois-a @dmcgoldrick
Hi, can you please guide how to convert the full length annotation gtf to the input gtf for rnaseqc. I have been using schmidtea_mediterranea.PRJNA379262.WBPS14.canonical_geneset.rnaseqc.gtf downloaded from here.

ftp://ftp.ebi.ac.uk/pub/databases/wormbase/parasite/releases/WBPS14/species/schmidtea_mediterranea/PRJNA379262/schmidtea_mediterranea.PRJNA379262.WBPS14.canonical_geneset.gtf.gz

I used collapse.py which produced this error:

python collapse_annotation.py schmidtea_mediterranea.PRJNA379262.WBPS14.canonical_geneset.rnaseqc_type.gtf new.gtf File "collapse_annotation.py", line 100
print('Parsing GTF: {0:d} genes processed\r'.format(len(self.genes)), end='\r')
^
SyntaxError: invalid syntax

And while running rnaseqc command, I'm facing issue of duplicate exon ids.

Failed to parse the GTF: Detected non-unique Exon ID: SMEST026639001.e4

Hi @jjyotikataria, so sorry for the delayed response. At first glance, it seems like you're using python 2. Could you try running the collapse_annotation.py script using python3.5 or greater?

Hi,
Related to this issue, I ran collapse_annotation.py using python 3.6.2 and got the below error. Any help would be appreciated. My end goal is to make rnaseqc work which core-dumps with my existing gtf file (that was downloaded from NCBI)

python3 collapse_annotation.py GCF_003668045.3_CriGri-PICRH-1.0_genomic.gtf GCF_003668045.3_CriGri-PICRH-1.0_genomic_collapsed.gtf

Traceback (most recent call last):
File "collapse_annotation.py", line 279, in
annotation = Annotation(args.transcript_gtf)
File "collapse_annotation.py", line 67, in init
attributes[kv[0]] = kv[1]
IndexError: list index out of range

Thank you for your quick response Jyoti- much appreciated! When you say it worked for you, do you mean to say you tried running "collapse_annotation.py" on the gtf file downloaded from here: https://www.ncbi.nlm.nih.gov/assembly/GCF_003668045.3/ ??
This is the exact gtf file that I'm interested in collapsing. Thanks again!