snakemake-workflows / cyrcular-calling

A Snakemake workflow for ecDNA detection in Nanopore or Illumina sequencing reads derived from DNA samples enriched for circular DNA.
https://snakemake.github.io/snakemake-workflow-catalog/?usage=snakemake-workflows/cyrcular-calling
MIT License
3 stars 2 forks source link

Run failed #7

Closed FuyuLi closed 1 year ago

FuyuLi commented 1 year ago

Hello, I have problem running the snakemake.

The stdout/stderr looks like this:

$snakemake --cores all --use-conda 
Workflow defines that rule get_genome is eligible for caching between workflows (use the --cache argument to enable this).
Workflow defines that rule genome_faidx is eligible for caching between workflows (use the --cache argument to enable this).
Workflow defines that rule minimap2_index is eligible for caching between workflows (use the --cache argument to enable this).
Workflow defines that rule download_annotation is eligible for caching between workflows (use the --cache argument to enable this).
Building DAG of jobs...
MissingInputException in rule varlociraptor_call in file https://raw.githubusercontent.com/snakemake-workflows/cyrcular-calling/v1.1.0/workflow/rules/call.smk, line 52:
Missing input files for rule varlociraptor_call:
    output: results/calling/calls/initial/Example.1-of-12.bcf
    wildcards: group=Example, scatteritem=1-of-12
    affected files:
        resources/scenarios/nanopore_circle_scenario.yaml

My config files:

==> config/config.yaml <==
calling:
  samples: config/samples.tsv
  units: config/units.tsv

  reference:
    # if `path` is not set, name should just be "genome" atm.
    name: "GRCh38_ref"
    # Custom path overrides everything below that, if file exists
    # (in that case, path must match "resources/" + name + ".fasta")
    path: "/REFERENCE/GRCh38/genome/GRCh38_full_analysis_set_plus_decoy_hla.fa"
    # The first n entries of the FASTA will be considered.
    n_chromosomes: 25
    # Ensembl species name
    species: homo_sapiens
    # Ensembl release
    release: 100
    # Genome build
    build: GRCh38

  min_read_depth: 2
  min_split_reads: 2
  max_paths_per_component: 15
  max_deletion_length: 10000

  filter:
    fdr-control:
      threshold: 0.1
      local: true
      events:
        circular:
          varlociraptor:
            - present

==> config/samples.tsv <==
group   sample  platform
Example Test nanopore
#Example        Example_Illumina        illumina

==> config/units.tsv <==
sample  unit    fq1     fq2
Test    0       /project/TestSample/01_NanoFilt/Test.q7.fastq.gz

Could you please help me solve this issue? All the best, FuyuLi

tedil commented 1 year ago

The error message indicates that the file resources/scenarios/nanopore_circle_scenario.yaml does not exist. Make sure that you call snakemake from the directory which contains the subdirectory named workflow/, since that directory (basically the root of this git repository) should have the file named resources/scenarios/nanopore_circle_scenario.yaml.

Also, make sure to follow the hints in the config.yaml:

    # if `path` is not set, name should just be "genome" atm.
    name: "GRCh38_ref"
    # Custom path overrides everything below that, if file exists
    # (in that case, path must match "resources/" + name + ".fasta")
    path: "/REFERENCE/GRCh38/genome/GRCh38_full_analysis_set_plus_decoy_hla.fa"

(This is sadly a bit unwieldy at the moment, sorry!) That is: if you set the name to "GRCh38_ref", the actual file should be called "GRCh38_ref.fasta" and should be placed in the resources/ subdirectory. Instead of copying/moving the reference there, you can of course also simply link it with ln -s /REFERENCE/GRCh38/genome/GRCh38_full_analysis_set_plus_decoy_hla.fa resources/GRCh38_ref.fasta.

If that does not solve your issue or you encounter more problems, please let me know!

FuyuLi commented 1 year ago

Thank you for your reply.

I modified the config file but I came across another error.

WorkflowError:
Failed to open source file /workdir/cyrcular-calling/workflow/rules/../envs/pigz.yaml
FileNotFoundError: [Errno 2] No such file or directory: '/workdir/cyrcular-calling/workflow/rules/../envs/pigz.yaml'

And I didn't find the pigz.yaml file in this github repository.

tedil commented 1 year ago

We have released a new version of the workflow @FuyuLi (and now also have CI enabled such that issues such as the one you encountered with missing files should be detected during testing now). You will have to adapt your config and sample sheets slightly (see https://github.com/snakemake-workflows/cyrcular-calling/tree/main/.test for an example), though. I hope this resolves your issues. If it does not (or if you encounter new issues) feel free to re-open this issue or open a new issue!