Magdoll / SQANTI2

SQANTI2 is now replaced by SQANTI3. Please go to: https://github.com/ConesaLab/SQANTI3
Other
38 stars 15 forks source link

Unable to import err_correct_w_genome or sam_to_gff3.py! Please make sure cDNA_Cupcake/sequence/ is in $PYTHONPATH. #20

Open tomasflyo opened 5 years ago

tomasflyo commented 5 years ago

Hi @Magdoll ,

I created the environment and installed all the packages as per the tutorial. I ran the following command: $ python sqanti_qc2.py --aligner_choice=minimap2 ~/pacbio/testdir/mapped.fa Homo_sapiens.GRCh38.97.gtf HangleeGCA_000001405.15_GRCh38_no_alt_analysis_set.fna.fai

and get this msg:

Unable to import err_correct_w_genome or sam_to_gff3.py! Please make sure cDNA_Cupcake/sequence/ is in $PYTHONPATH.

sys.path shows that cDNA_Cupcake/sequence/ is in pythonpath

my Cupcake version:

Last Updated: 06/25/2019 Current version: 7.9

1) Any suggestions? 2) the instructions first note that for Iso-Seq output, one can use either FASTA/FASTQ, but the command lines then go on to mention FASTA format only. I took my Collapsed Filtered Isoforms FASTQ file (already mapped) and converted it to fasta format. is that OK?

Thanks

Magdoll commented 5 years ago

Hi @tomasflyo ,

  1. Please try the following import commands

    from err_correct_w_genome import err_correct
    from sam_to_gff3 import convert_sam_to_gff3
    from STAR import STARJunctionReader
    from BED import LazyBEDPointReader
    import coordinate_mapper as cordmap
  2. FASTA and FASTQ are both accepted. I'll change the documentation. -Liz

Magdoll commented 5 years ago

Close until further notice.

rebailey commented 4 years ago

Hi @Magdoll

I'm experiencing the same issue. The $PYTHONPATH is set correctly and I've run the import commands above but I'm still generating the "Unable to import err_correct_w_genome or sam_to_gff3.py! Please make sure cDNA_Cupcake/sequence/ is in $PYTHONPATH" error.

Any other tips to possibly remedy this. Thanks!

Magdoll commented 4 years ago

Hi @rebailey , Can you confirm that

  1. If you do $PYTHONPATH at the command line you do see the Cupcake repo in the path?

    $ $PYTHONPATH
    -bash: :/home/UNIXHOME/etseng/GitHub/cDNA_Cupcake/sequence/
  2. The import statements below work?

    from err_correct_w_genome import err_correct
    from sam_to_gff3 import convert_sam_to_gff3
    from STAR import STARJunctionReader
    from BED import LazyBEDPointReader
    import coordinate_mapper as cordmap
  3. Can you give me the full sqanti_qc2.py command you were trying to run?

yjx1217 commented 4 years ago

Same error here. 1) I can confirm /path_to/cDNA_Cupcake/sequence/ is part of my $PYTHONPATH.

2) Adding the following patch into sqanti_qc2.py does not solve the problem:

from err_correct_w_genome import err_correct
from sam_to_gff3 import convert_sam_to_gff3
from STAR import STARJunctionReader
from BED import LazyBEDPointReader
import coordinate_mapper as cordmap

3) The command that I tested is simply: python sqanti_qc2.py -h

Best, Jia-Xing

Magdoll commented 4 years ago

Hi @yjx1217 , Can you confirm that if you simply use a Python interpreter from command line, the following commands work:

$ python
Python 3.7.4 (default, Aug 13 2019, 20:35:49) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from err_correct_w_genome import err_correct
>>> from sam_to_gff3 import convert_sam_to_gff3
>>> from STAR import STARJunctionReader
>>> from BED import LazyBEDPointReader
>>> import coordinate_mapper as cordmap
yjx1217 commented 4 years ago

Hi @Magdoll ,

Thanks for the quick response!

After some testing, I solved the problem. It seems the problem for me is that when I set the python path, I just did PYTHONPATH="/path_to/cDNA_Cupcake/sequence/:$PYTHONPATH", whereas I should do export PYTHONPATH="/path_to/cDNA_Cupcake/sequence/:$PYTHONPATH".

However, I did came across another issue. I will issue a new ticket for that one.

Best, Jia-Xing

rebailey commented 4 years ago

Hi @Magdoll,

Turns out there was a typo in my $PYTHONPATH, I fixed it and with a clean install of cDNA_Cupcake SQANTI2 is working.

Thanks for your help! Ryan