Kingsford-Group / squid

SQUID detects both fusion-gene and non-fusion-gene structural variations from RNA-seq data
BSD 3-Clause "New" or "Revised" License
40 stars 22 forks source link

erro in Annotate #19

Closed liangyuli12138 closed 4 years ago

liangyuli12138 commented 4 years ago

python AnnotateSQUIDOutput.py --genesymbol \ /public/workspace/lily/INDEX-hg19/anno/ucsc_hg19_gene.gtf \ /public/workspace/lily/squidout_sv.txt \ /public/workspace/lily/zhao_res/squid/CGGA1003.squid.finalout

this is my code to Annotate my result,However, there was an erro:

[3, 5] Missing GTFfile or SquidPrediction or OutputFile

so i don't know waht's wrong ,i had prepared the three files .

any suggestions will be appreciated!

Congm12 commented 4 years ago

Hi,

The keyword "--genesymbol" should have a following argument to specify in the GTF file which attribute corresponds to the gene symbol. For example, if the attribute name in the GTF file is "gene_name", your command should be

python AnnotateSQUIDOutput.py --genesymbol gene_name\ 
/public/workspace/lily/INDEX-hg19/anno/ucsc_hg19_gene.gtf \ 
/public/workspace/lily/squidout_sv.txt \ 
/public/workspace/lily/zhao_res/squid/CGGA1003.squid.finalout

You should look at the 9th column of your GTF file to find the attributes and feed in the correct attribute name for the gene symbol.

liangyuli12138 commented 4 years ago

yep!,it's work However,there is a new erro:

Traceback (most recent call last): File "/public/workspace/lily/software/squid-v1.5_linux_x86_64/AnnotateSQUIDOutput.py", line 333, in Transcripts = ReadGTF(GTFfile, key_gene_id, key_gene_symbol) File "/public/workspace/lily/software/squid-v1.5_linux_x86_64/AnnotateSQUIDOutput.py", line 98, in ReadGTF tmpgenename=GetFeature(line, key_gene_symbol) File "/public/workspace/lily/software/squid-v1.5_linux_x86_64/AnnotateSQUIDOutput.py", line 57, in GetFeature s=line.index(key) ValueError: substring not found

and i use python-3.6.6 Do i have to change the version ?

Congm12 commented 4 years ago

The error suggests that the attribute name does not appear in some of the lines in the GTF file. Please make sure that the attribute name is exactly the same as the one in GTF. Or if you paste a few lines from the GTF file, I can further track down the problem or check whether the attributes are very different from what this script assumes.

liangyuli12138 commented 4 years ago

OK, It's work ,Tks a lot