diff --git a/.ruff.toml b/.ruff.toml deleted file mode 100644 index f11cf63..0000000 --- a/.ruff.toml +++ /dev/null @@ -1 +0,0 @@ -line-length = 120 diff --git a/Snakefile b/Snakefile index e15b6a7..6f0dab6 100644 --- a/Snakefile +++ b/Snakefile @@ -1,7 +1,6 @@ import csv import os import pandas as pd -import warnings from pathlib import Path from utils import get, perform @@ -551,10 +550,10 @@ def fastqc_dump_fastq_input(wildcards): if perform.prefetch(config): if str(wildcards.PE_SE) == "1": return [ - checkpoints.fasterq_dump.get(tissue_name=wildcards.tissue_name, tag=wildcards.tag, PE_SE="1").output[0], - checkpoints.fasterq_dump.get(tissue_name=wildcards.tissue_name, tag=wildcards.tag, PE_SE="2").output[0], + checkpoints.fasterq_dump.get(tissue_name=wildcards.tissue_name, tag=wildcards.tag, PE_SE="1").output[0], # type: ignore + checkpoints.fasterq_dump.get(tissue_name=wildcards.tissue_name, tag=wildcards.tag, PE_SE="2").output[0], # type: ignore ] - return checkpoints.fasterq_dump.get(tissue_name=wildcards.tissue_name, tag=wildcards.tag, PE_SE="S").output + return checkpoints.fasterq_dump.get(tissue_name=wildcards.tissue_name, tag=wildcards.tag, PE_SE="S").output # type: ignore # Make sure we are able to load local FastQ files if "LOCAL_FASTQ_FILES" in config.keys() and os.path.exists(config["LOCAL_FASTQ_FILES"]): @@ -649,7 +648,7 @@ def contaminant_screen_input(wildcards): # If we have performed fasterq_dump, return its output if perform.dump_fastq(config): - return checkpoints.fasterq_dump.get(**wildcards).output + return checkpoints.fasterq_dump.get(**wildcards).output # type: ignore # Otherwise collect local files fastq_files = Path(config["LOCAL_FASTQ_FILES"]) @@ -691,10 +690,10 @@ def get_trim_input(wildcards): if perform.dump_fastq(config): if str(wildcards.PE_SE) in ["1", "2"]: return [ - *checkpoints.fasterq_dump.get(tissue_name=wildcards.tissue_name, tag=wildcards.tag, PE_SE="1").output, - *checkpoints.fasterq_dump.get(tissue_name=wildcards.tissue_name, tag=wildcards.tag, PE_SE="2").output, + *checkpoints.fasterq_dump.get(tissue_name=wildcards.tissue_name, tag=wildcards.tag, PE_SE="1").output, # type: ignore + *checkpoints.fasterq_dump.get(tissue_name=wildcards.tissue_name, tag=wildcards.tag, PE_SE="2").output, # type: ignore ] - return checkpoints.fasterq_dump.get(tissue_name=wildcards.tissue_name, tag=wildcards.tag, PE_SE="S").output + return checkpoints.fasterq_dump.get(tissue_name=wildcards.tissue_name, tag=wildcards.tag, PE_SE="S").output # type: ignore else: files = list( Path(config["LOCAL_FASTQ_FILES"]).rglob("{tissue_name}_{tag}_{PE_SE}.fastq.gz".format(**wildcards)) @@ -750,11 +749,11 @@ checkpoint trim: def get_fastqc_trim_input(wildcards): if wildcards.PE_SE == "1": - forward = str(checkpoints.trim.get(tissue_name=wildcards.tissue_name, tag=wildcards.tag, PE_SE="1").output) - reverse = str(checkpoints.trim.get(tissue_name=wildcards.tissue_name, tag=wildcards.tag, PE_SE="2").output) + forward = str(checkpoints.trim.get(tissue_name=wildcards.tissue_name, tag=wildcards.tag, PE_SE="1").output) # type: ignore + reverse = str(checkpoints.trim.get(tissue_name=wildcards.tissue_name, tag=wildcards.tag, PE_SE="2").output) # type: ignore return [forward, reverse] else: - return checkpoints.trim.get(tissue_name=wildcards.tissue_name, tag=wildcards.tag, PE_SE="S").output + return checkpoints.trim.get(tissue_name=wildcards.tissue_name, tag=wildcards.tag, PE_SE="S").output # type: ignore rule fastqc_trim: @@ -811,20 +810,20 @@ def star_input(wildcards): if perform.trim(config): items.extend( [ - *checkpoints.trim.get(tissue_name=wildcards.tissue_name, tag=wildcards.tag, PE_SE="1").output, - *checkpoints.trim.get(tissue_name=wildcards.tissue_name, tag=wildcards.tag, PE_SE="2").output, + *checkpoints.trim.get(tissue_name=wildcards.tissue_name, tag=wildcards.tag, PE_SE="1").output, # type: ignore + *checkpoints.trim.get(tissue_name=wildcards.tissue_name, tag=wildcards.tag, PE_SE="2").output, # type: ignore ] if is_paired_end - else [*checkpoints.trim.get(tissue_name=wildcards.tissue_name, tag=wildcards.tag, PE_SE="S").output] + else [*checkpoints.trim.get(tissue_name=wildcards.tissue_name, tag=wildcards.tag, PE_SE="S").output] # type: ignore ) elif perform.dump_fastq(config): items.extend( [ - *checkpoints.fasterq_dump.get(tissue_name=wildcards.tissue_name, tag=wildcards.tag, PE_SE="1").output, - *checkpoints.fasterq_dump.get(tissue_name=wildcards.tissue_name, tag=wildcards.tag, PE_SE="2").output, + *checkpoints.fasterq_dump.get(tissue_name=wildcards.tissue_name, tag=wildcards.tag, PE_SE="1").output, # type: ignore + *checkpoints.fasterq_dump.get(tissue_name=wildcards.tissue_name, tag=wildcards.tag, PE_SE="2").output, # type: ignore ] if is_paired_end - else [*checkpoints.fasterq_dump.get(tissue_name=wildcards.tissue_name, tag=wildcards.tag, PE_SE="S").output] + else [*checkpoints.fasterq_dump.get(tissue_name=wildcards.tissue_name, tag=wildcards.tag, PE_SE="S").output] # type: ignore ) else: for file in Path(config["LOCAL_FASTQ_FILES"]).rglob(f"*{file_pattern}"): diff --git a/cluster/config.yaml b/cluster/config.yaml deleted file mode 100644 index 615ecbc..0000000 --- a/cluster/config.yaml +++ /dev/null @@ -1,41 +0,0 @@ -# This file configures various settings for snakemake to execute jobs to a SLURM cluster. -# FROM: https://github.com/jdblischak/smk-simple-slurm - -cluster: - mkdir -p logs/{rule}/{resources.tissue_name} && - sbatch - --job-name=smk-{rule}-{wildcards} - --account=helikarlab - --cpus-per-task={threads} - --output=logs/{rule}/{resources.tissue_name}/{rule}-{wildcards}.out - --mem={resources.mem_mb} - --time={resources.runtime} - --parsable - -default-resources: - - mem_mb=2048 - -# Job submittion -cores: 16 # max cores used in snakefile -cluster-cancel: scancel -cluster-cancel-nargs: 50 -restart-times: 0 -max-jobs-per-second: 10 -max-status-checks-per-second: 5 -latency-wait: 60 -jobs: 250 - -# Other settings -printshellcmds: True -rerun-incomplete: True - -groups: - - preroundup=preroundup_group - - copy_gene_counts=copy_group - - copy_rnaseq_metrics=copy_group - - copy_insert_size=copy_group - - copy_fragment_size=copy_group - -# Do not change these settings. This pipeline will fail to execute if they are changed -use-conda: True -conda-frontend: mamba