hyunhwan-jeong / SalmonTE

SalmonTE is an ultra-Fast and Scalable Quantification Pipeline of Transpose Element (TE) Abundances
GNU General Public License v3.0
81 stars 23 forks source link

quant mode error "name 'directory' is not defined" #27

Closed mbk0asis closed 4 years ago

mbk0asis commented 5 years ago

Hi. I'm getting an error saying "name 'directory' is not defined". It seemed to related to output directory, but changing names and paths of output directory didn't solve the problem. What could be the cause of this error?

$ SalmonTE.py quant --reference=mm --outpath=test --num_threads=20 d0.1.control.1.val.1.fq.gz d0.1.control.2.val.2.fq.gz

2019-02-11 11:25:39,544 Starting quantification mode
2019-02-11 11:25:39,544 Collecting FASTQ files...
2019-02-11 11:25:39,545 The input dataset is considered as a paired-ends dataset.
2019-02-11 11:25:39,545 Collected 1 FASTQ files.
2019-02-11 11:25:39,546 Quantification has been finished.
2019-02-11 11:25:39,546 Running Salmon using Snakemake
NameError in line 24 of /home/bio0/bin/SalmonTE-master/snakemake/Snakefile.paired:
name 'directory' is not defined
  File "/home/bio0/bin/SalmonTE-master/snakemake/Snakefile.paired", line 24, in <module>
2019-02-11 11:25:39,673 NameError in line 24 of /home/bio0/bin/SalmonTE-master/snakemake/Snakefile.paired:
name 'directory' is not defined
  File "/home/bio0/bin/SalmonTE-master/snakemake/Snakefile.paired", line 24, in <module>
Traceback (most recent call last):
  File "/home/bio0/bin/SalmonTE-master/SalmonTE.py", line 286, in <module>
    run(args)
  File "/home/bio0/bin/SalmonTE-master/SalmonTE.py", line 237, in run
    run_salmon(param)
  File "/home/bio0/bin/SalmonTE-master/SalmonTE.py", line 153, in run_salmon
    with open(os.path.join(param["--outpath"], "EXPR.csv" ), "r") as inp:
FileNotFoundError: [Errno 2] No such file or directory: 'test/EXPR.csv'
hyunhwan-jeong commented 5 years ago

@mbk0asis what is your snakemake version? If the version is not latest, then please upgrade snakemake. SalmonTE no longer supports old-version of snakemake..

mbk0asis commented 5 years ago

Seemed like the 'pip cache' directory was disabled due to a permission problem, and the 'snakemake' upgrade was not applied to the system. That solved the problem, but NOW I've got a new error. Would you check this out? Thank you.


2019-02-11 16:39:44,951 Starting quantification mode
2019-02-11 16:39:44,951 Collecting FASTQ files...
2019-02-11 16:39:44,952 The input dataset is considered as a paired-ends dataset.
2019-02-11 16:39:44,952 Collected 1 FASTQ files.
2019-02-11 16:39:44,953 Quantification has been finished.
2019-02-11 16:39:44,953 Running Salmon using Snakemake
Job counts:
    count   jobs
    1   all
    1   collect_abundance
    1   collect_mappability
    3
2019-02-11 16:39:45,138 Job counts:
    count   jobs
    1   all
    1   collect_abundance
    1   collect_mappability
    3
Job counts:
    count   jobs
    1   collect_abundance
    1
Job counts:
    count   jobs
    1   collect_mappability
    1
[Mon Feb 11 16:39:46 2019]
Error in rule collect_mappability:
    jobid: 0
    output: test/MAPPING_INFO.csv

RuleException:
KeyError in line 98 of /home/bio0/bin/SalmonTE-master/snakemake/Snakefile.paired:
'SampleID'
  File "/home/bio0/bin/SalmonTE-master/snakemake/Snakefile.paired", line 98, in __rule_collect_mappability
  File "/home/bio0/miniconda3/lib/python3.6/site-packages/pandas/core/frame.py", line 3909, in set_index
  File "/home/bio0/miniconda3/lib/python3.6/site-packages/pandas/core/frame.py", line 2688, in __getitem__
  File "/home/bio0/miniconda3/lib/python3.6/site-packages/pandas/core/frame.py", line 2695, in _getitem_column
  File "/home/bio0/miniconda3/lib/python3.6/site-packages/pandas/core/generic.py", line 2486, in _get_item_cache
  File "/home/bio0/miniconda3/lib/python3.6/site-packages/pandas/core/internals.py", line 4115, in get
  File "/home/bio0/miniconda3/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 3066, in get_loc
  File "pandas/_libs/index.pyx", line 140, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/index.pyx", line 162, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/hashtable_class_helper.pxi", line 1492, in pandas._libs.hashtable.PyObjectHashTable.get_item
  File "pandas/_libs/hashtable_class_helper.pxi", line 1500, in pandas._libs.hashtable.PyObjectHashTable.get_item
  File "/home/bio0/miniconda3/lib/python3.6/concurrent/futures/thread.py", line 56, in run
Exiting because a job execution failed. Look above for error message
Exiting because a job execution failed. Look above for error message
2019-02-11 16:39:46,297 Exiting because a job execution failed. Look above for error message
hyunhwan-jeong commented 5 years ago

@mbk0asis I found there is an issue with the files contains many dots. The quickest solution would be to change the file name d0_R1.fq.gz and d0_R2.fq.gz. I may need to spend the time to find a better way of dealing with the file name.

mbk0asis commented 5 years ago

It worked after I replaced all the dots!

감사합니다.