pachterlab / kallisto-transcriptome-indices

Reference transcriptome indices build from kallisto for popular organisms
41 stars 5 forks source link

Transcript version number in t2g.py #3

Closed ag1805x closed 4 years ago

ag1805x commented 4 years ago

I have successfully built index for GRCh38 release-97. Next I was trying to create transcripts_to_genes file with the t2g.py script given here, but it doesn't return the version number even with the -v option on.

ag1805x commented 4 years ago

I have successfully built index for GRCh38 release-97. Next I was trying to create transcripts_to_genes file with the t2g.py script given here, but it doesn't return the version number even with the -v option on.

I found an alternate way to generate this:

zcat Homo_sapiens.GRCh38.cdna.all.fa.gz | grep '>' | cut -d ' ' -f1,4,7 > temp
paste <(cut -d '>' -f2 temp | cut -d ' ' -f1) <(cut -d ' ' -f2 temp | cut -d ':' -f2) <(cut -d ' ' -f3 temp | cut -d ':' -f2) >> tx2gene.txt
rm temp
LouisFaure commented 4 years ago

That is because the two following lines are commented:

# tid += '.' + d['transcript_version']
# gid += '.' + d['gene_version']

uncommenting these solve the issue

ag1805x commented 4 years ago

That is because the two following lines are commented:

# tid += '.' + d['transcript_version']
# gid += '.' + d['gene_version']

uncommenting these solve the issue

I thought the same thing and removed those # but it throws up a different error.

File "./t2g.py", line 35
    tid += '.' + d['transcript_version']
                                       ^
IndentationError: unindent does not match any outer indentation level
LouisFaure commented 4 years ago

You need to remove the space after # as well

ag1805x commented 4 years ago

You need to remove the space after # as well

Thank you. It did finally work.