zhxiaokang / RASflow

RNA-Seq analysis workflow
MIT License
105 stars 58 forks source link

reverse is reserved for internal use error #31

Closed Michael-Geuenich closed 1 year ago

Michael-Geuenich commented 2 years ago

I just cloned this repository, created the conda environment and activated it.

The first issue I ran into is that snakemake requires the number of jobs to be set:

Start Quality Control!
Error: you need to specify the maximum number of CPU cores to be used at the same time. If you want to use N cores, say --cores N or -jN. For all cores on your system (be sure that this is appropriate) use --cores
all. For no parallelization use --cores 1 or -j1.
Quality control is done!
 Please check the report and decide whether trimming is needed
 Please remember to turn off the QC in the config file!

This is even though I have the number of cores specified to 1 or 4 on line 38 of the config:

## number of cores you want to allocate to this workflow
NCORE: 4  # Use command "getconf _NPROCESSORS_ONLN" to check the number of cores/CPU on your machine

Adding --jobs 1 to the main.py file on line 65 as follows luckily fixed that issue:

os.system("nice -5 snakemake --jobs 1 -s workflow/quality_control.rules 2>&1 | tee logs/log_quality_control.txt")

However, now I'm getting the following error:

Start Quality Control!
AttributeError in line 23 of /home/campbell/mgeuenic/RASflow/workflow/quality_control.rules:
invalid name for input, output, wildcard, params or log: reverse is reserved for internal use
  File "/home/campbell/mgeuenic/RASflow/workflow/quality_control.rules", line 23, in <module>
Quality control is done!

The snakemake version inside the environment is as it should be (I believe)

$ snakemake -v
5.32.0

I've also checked the output folder and the logs but there are no changes in either. Any ideas on what the issue is/how to fix it?

zhxiaokang commented 2 years ago

The default snakemake in RASflow is v5.3.0 (if you set up the Conda environment with the yaml file env.yaml (as explained in the tutorial file). The error you got about specifying the number of cores in the command is a new feature in the newer versions of snakemake.

Regarding the error in the quality control step, as stated in the error message, "reverse" is reserved by your machine either in the system or by some tool. You can try to change "reverse" to another name, such as "reverse1" (remember to change every variable name), in workflow/quality_control.rules.