agshumate / Liftoff

An accurate GFF3/GTF lift over pipeline
GNU General Public License v3.0
442 stars 54 forks source link

UnboundLocalError: local variable 'feature_db' referenced before assignment #75

Open Huangyizhong opened 3 years ago

Huangyizhong commented 3 years ago

Hi, there The liftoff is a good software to do the annotation of the genome. I have used it to do the same work these days. When I runned the liftoff using the codes as follows: /softwares/miniconda3/bin/liftoff -g Sus_scrofa.Sscrofa11.1.104.gff3 -chroms merge_chromosomes.txt -unplaced Sus11.1_unplaced.txt -o other_liftoff other.fa Sus_scrofa11.1.fa Unfortunately, the probems comes out: image The gffs file show like this: image

agshumate commented 3 years ago

Hi, can you please let me know which version of liftoff you are using? Thanks!

Huangyizhong commented 3 years ago

Hi, can you please let me know which version of liftoff you are using? Thanks!

Hi, the version of the liftoff is v.1.6.1. image

I have used the -f parameter to add the additional parent feature types. /home/softwares/miniconda3/bin/liftoff -g Sus11.1_new.gff3 -chroms merge_chromosomes.txt -unplaced Sus11.1_unplaced.txt -f Features.txt -o other_liftoff other.fa Sus_scrofa11.1.fa The same problems come out. How can I deal with it ? Thanks again for your help! Sincerely Yizhong Huang

Huangyizhong commented 3 years ago

Hi, the -chroms and the -unplaced file are listed as follows: image image The features files : image

agshumate commented 3 years ago

has a database of the gff been created in your working directory? it should be the same name as the annotation file with "_db" at the end. if so, can you delete this and trying running liftoff again and let me know if you have the same issue?

Huangyizhong commented 3 years ago

has a database of the gff been created in your working directory? it should be the same name as the annotation file with "_db" at the end. if so, can you delete this and trying running liftoff again and let me know if you have the same issue?

Thanks for your quick reply. I have solved the problems and the Liftoff run well. But I have another question about the result from the Liftoff. I want to annotate the same species using the Liftoff. The buso evaluation of the ref genome protein is about 96%. Then I used the Liftoff to convert the gene and some other features to the new genome. Most of the genes can be converted, while the buso is about 92.3%. How to deal with it? Thanks again for your kind help! Yizhong Huang

agshumate commented 3 years ago

Hi I am not sure i understand your question. Are you saying that liftoff transferred more or less genes/features that what you expected from buso?

Huangyizhong commented 3 years ago

Hi I am not sure i understand your question. Are you saying that liftoff transferred more or less genes/features that what you expected from buso?

Hi, thanks for your kind reply and sorry for the confusion. I use the liftoff to annotate the same species (sus ,pigs ). Before conducting it, I evaluated the buso of the ref genome protein is about 96%. Then I used the Liftoff to convert the gene and some other features to the new assemblied genome. I found that most of the genes can be converted, and then I used the gffread to extract the protein sequence based on the new converted gff3, while the buso is about 92.3%. As for the 9226 conversed proteins used for evaluation, I though that most of the conserved genes in the reference genome could be converted successfully. I am so confused about it . Is there some parameters that I should change? Thanks so much !

agshumate commented 3 years ago

I am still having a bit of a hard time understanding what part of your results were unexpected. If i am reading this correct it seems like it was expected that the genes would be converted and that liftoff did indeed map most of the genes? Is the problem that the 92.% is lower than the initial 96%?

Huangyizhong commented 3 years ago

Sorry again. Yes, the liftoff can convert most of genes from the reference genome (224/21303). Because we assembied species genome was very closed to the reference, so I think that the converted gff3 busco should be equal or a bit less than the reference. The problem is why the converted gff3 busco (92%) lower than the initial 96% ? Which parameters should I change to deal with it ? Sincerely Yizhong Huang

agshumate commented 3 years ago

without knowing more about the quality of your new assembly, i can't be sure that liftoff is the problem here. but some parameters that may improve mapping are using the -polish option and -flank 0.1 and also increasing -d (to maybe 10 for example).