Skip to content

Commit

Permalink
Merge pull request #4 from MPUSP/dev
Browse files Browse the repository at this point in the history
fix: various small fixes for linting and formatting errors
  • Loading branch information
m-jahn authored Sep 24, 2024
2 parents 62269d9 + 233bf95 commit c882090
Show file tree
Hide file tree
Showing 16 changed files with 23 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Tests

on:
push:
branches: [ main ]
branches: [ main, dev ]
pull_request:
branches: [ main ]
branches: [ main, dev ]


jobs:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
results/**
data/**
.test/results/**
.test/data/**
resources/**
logs/**
.snakemake
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# snakemake-ont-bacterial-variants

![Platform](https://img.shields.io/badge/platform-all-green)
[![Snakemake](https://img.shields.io/badge/snakemake-≥6.3.0-brightgreen.svg)](https://snakemake.github.io)
[![GitHub actions status](https://github.com/MPUSP/snakemake-ont-bacterial-variants/workflows/Tests/badge.svg?branch=main)](https://github.com/MPUSP/snakemake-ont-bacterial-variants/actions?query=branch%3Amain+workflow%3ATests)
[![Tests](https://github.com/MPUSP/snakemake-ont-bacterial-variants/actions/workflows/main.yml/badge.svg)](https://github.com/MPUSP/snakemake-ont-bacterial-variants/actions/workflows/main.yml)
[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)
[![workflow catalog](https://img.shields.io/badge/Snakemake%20workflow%20catalog-darkgreen)](https://snakemake.github.io/snakemake-workflow-catalog)

A Snakemake workflow for the identification of variants in bacterial genomes using nanopore long-read sequencing.

Expand Down
1 change: 0 additions & 1 deletion workflow/envs/basic.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: basic
channels:
- conda-forge
- defaults
dependencies:
- python=3.9
- pandas=2.1.4
2 changes: 1 addition & 1 deletion workflow/envs/bcftools.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: bcftools
channels:
- bioconda
- conda-forge
- bioconda
dependencies:
- bcftools=1.19
2 changes: 1 addition & 1 deletion workflow/envs/clair3.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: clair3
channels:
- bioconda
- conda-forge
- bioconda
dependencies:
- clair3=1.0.5
2 changes: 1 addition & 1 deletion workflow/envs/cutesv.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: cutesv
channels:
- bioconda
- conda-forge
- bioconda
dependencies:
- cutesv=2.1.0
2 changes: 1 addition & 1 deletion workflow/envs/filtlong.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: filtlong
channels:
- bioconda
- conda-forge
- bioconda
dependencies:
- filtlong=0.2.1
2 changes: 1 addition & 1 deletion workflow/envs/igv-reports.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: igv-reports
channels:
- bioconda
- conda-forge
- bioconda
dependencies:
- igv-reports=1.10.0
2 changes: 1 addition & 1 deletion workflow/envs/medaka.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: medaka
channels:
- bioconda
- conda-forge
- bioconda
dependencies:
- medaka=1.11.3
2 changes: 1 addition & 1 deletion workflow/envs/multiqc.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: multiqc
channels:
- bioconda
- conda-forge
- bioconda
dependencies:
- multiqc=1.19
- rich-click=1.6.1
2 changes: 1 addition & 1 deletion workflow/envs/nanoplot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: nanoplot
channels:
- bioconda
- conda-forge
- bioconda
dependencies:
- nanoplot=1.42.0
2 changes: 1 addition & 1 deletion workflow/envs/ngmlr.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: ngmlr
channels:
- bioconda
- conda-forge
- bioconda
dependencies:
- ngmlr=0.2.7
- samtools=1.9
Expand Down
2 changes: 1 addition & 1 deletion workflow/envs/sniffles2.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: sniffles2
channels:
- bioconda
- conda-forge
- bioconda
dependencies:
- sniffles=2.2
2 changes: 1 addition & 1 deletion workflow/envs/vcftools.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: vcftools
channels:
- bioconda
- conda-forge
- bioconda
dependencies:
- vcftools=0.1.16
11 changes: 6 additions & 5 deletions workflow/rules/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ def list_reference_genomes():
paths = SAMPLEINFO["reference"].unique()
genomes = {}
for path in paths:
ident = ".".join(path.split('/')[-1].split(".")[:-1])
ident = os.path.basename(path)
ident = os.path.splitext(ident)[0]
if not ident in genomes.keys():
genomes[ident] = path
return genomes
Expand Down Expand Up @@ -51,10 +52,10 @@ def download_model_for_clair3(wildcards):
"r1041_e82_400bps_sup_v4.2.0": "https://cdn.oxfordnanoportal.com/software/analysis/models/clair3/r1041_e82_400bps_sup_v420.tar.gz",
"r1041_e82_400bps_sup_v4.3.0": "https://cdn.oxfordnanoportal.com/software/analysis/models/clair3/r1041_e82_400bps_sup_v430.tar.gz",
}
return (
path2model[config["basecalling_model"]],
path2model[config["basecalling_model"]].split('/')[-1].split(".tar.gz")[0],
)
model = path2model[config["basecalling_model"]]
model_name = os.path.basename(model)
model_name = model_name.replace(".tar.gz", "")
return (model, model_name)


def get_medaka_model(wildcards):
Expand Down

0 comments on commit c882090

Please sign in to comment.