KosinskiLab / AlphaPulldownSnakemake

GNU General Public License v3.0
3 stars 0 forks source link

Flags parsing error #14

Closed DimaMolod closed 6 months ago

DimaMolod commented 6 months ago

I tried to run the latest version from main but got this error:

`FATAL Flags parsing error: flag --data_directory=None: Flag --data_directory must have a value other than None. flag --features_directory=None: Flag --features_directory must have a value other than None. Pass --helpshort or --helpfull to see help on flags. [Wed May 29 14:31:08 2024] Error in rule structure_inference: jobid: 0 input: /scratch/dima/AP/Z-disc/ap20/features/Q702N8-2.pkl, /scratch/dima/AP/Z-disc/ap20/features/Q86TC9.pkl output: /scratch/dima/AP/Z-disc/ap20/predictions/Q702N8-2:837-978_Q86TC9/completed_fold.txt shell:

MAXRAM=$(bc <<< "$(ulimit -m) / 1024.0")

    #GPUMEM=$(nvidia-smi --query-gpu=memory.total --format=csv,noheader,nounits | tail -1)
    #export XLA_PYTHON_CLIENT_MEM_FRACTION=$(echo "scale=3; $MAXRAM / $GPUMEM" | bc)
    #export TF_FORCE_UNIFIED_MEMORY='1'
    run_structure_prediction.py             --input Q702N8-2:837-978_Q86TC9             --output_directory=/scratch/dima/AP/Z-disc/ap20/predictions/Q702N8-2:837-978_Q86TC9             --protein_delimiter _      --data_directory=/scratch/AlphaFold_DBs/2.3.2             --features_directory=/scratch/dima/AP/Z-disc/ap20/features             --num_predictions_per_model=v --num_cycle=v --data_directory=v --features_directory=v`

Could it be because there is a white space after --protein_delimiter and not '='? Where did these 'v' letters come from? Also, what is the proper way of debugging code with snake deploy? Do I need to create a new branch on git and re-deploy to debug or there is a easier way?

DimaMolod commented 6 months ago

I also tried to run with explicit parameters in config.yaml for --data_directory and --features_directory like this:

...
 create_feature_arguments:
  --save_msa_files: False
  --use_precomputed_msas: True
  --max_template_date: 2050-01-01
  --skip_existing: False

structure_inference_arguments:
  --num_predictions_per_model : 10
  --num_cycle : 24
  --data_directory : /scratch/AlphaFold_DBs/2.3.2
  --features_directory : /scratch/dima/AP/Z-disc/ap20/features
...

...and it did not help...

maurerv commented 6 months ago

The v comes from missing brackets here:

cli_parameters = " ".join( [f"{k}=v" for k, v in config["structure_inference_arguments"].items()] ) Fixed in 4477b8e187a50df4cee45ad791e523ac38182411 features_directory should not be specifiable by the user and data_directory should be defined outside structure_inference_arguments. Perhaps there is a way to ensure that in future versions

DimaMolod commented 6 months ago

3 minutes to fix a bug, love you @maurerv