Skip to content

Commit

Permalink
Main (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
WardDeb committed Aug 16, 2024
2 parents 89b04e6 + 389bae2 commit c06b512
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 277 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
- name: build docs
run: |
micromamba activate dissectBCL
pip install .
pip install .[docs]
cd docs
pip install -r requirements.txt
make html
3 changes: 2 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ python:
install:
- method: pip
path: .
- requirements: docs/requirements.txt
extra_requirements:
- docs
10 changes: 10 additions & 0 deletions contaminome.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ prokaryotes:
vulgarname: haemophilus
accession: GCF_000931575.1
taxid: 727
Wolbachia melanogaster symbiont:
URL: https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/016/584/425/GCA_016584425.1_ASM1658442v1/GCA_016584425.1_ASM1658442v1_genomic.fna.gz
vulgarname: wolbachia
accession: GCF_016584425.1
taxid: 163164
Staphylococcus aureus:
URL: https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/013/425/GCF_000013425.1_ASM1342v1/GCF_000013425.1_ASM1342v1_genomic.fna.gz
vulgarname: staph_aureus
accession: GCF_000013425.1
taxid: 1280
custom:
Severe acute respiratory syndrome coronavirus 2:
URL: https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/009/858/895/GCF_009858895.2_ASM985889v3/GCF_009858895.2_ASM985889v3_genomic.fna.gz
Expand Down
2 changes: 0 additions & 2 deletions docs/requirements.txt

This file was deleted.

15 changes: 9 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,16 @@ dependencies = [
]
[project.optional-dependencies]
dev = [
"ruff",
"coverage",
"pytest",
"pytest-cov",
"pytest-datafiles"
"ruff",
"coverage",
"pytest",
"pytest-cov",
"pytest-datafiles"
]
docs = [
"sphinx>=7.2.6",
"sphinx_rtd_theme>=2.0.0"
]

[project.scripts]
dissect = "dissectBCL.dissect:dissect"
wd40 = "wd40.wd40:cli"
Expand Down
2 changes: 2 additions & 0 deletions src/tools/prep_contaminome.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
'mycoplasma': [2148, 14, 'species'],
'mycoplasma-hyorhinis': [2100, 14, 'species'],
'haemophilus': [727, 14, 'species'],
'wolbachia': [163164, 14, 'species'],
'staph_aureus': [1280, 14, 'species'],
'sars-cov2': [2697049, 7, 'species'],
'flu-a': [335341, 7, 'species'],
'noro': [11983, 7, 'species'],
Expand Down
74 changes: 0 additions & 74 deletions src/wd40/cat.py

This file was deleted.

133 changes: 0 additions & 133 deletions src/wd40/diagnose.py

This file was deleted.

60 changes: 1 addition & 59 deletions src/wd40/wd40.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
from rich import print
from importlib.metadata import version
import os
import sys
from dissectBCL.misc import getConf
from wd40.release import rel as release
from wd40.cat import catRun
from wd40.diagnose import diagnose

can_string = "[red] ___ \n[/red]"
can_string += "[red] |___|--------[/red]\n"
Expand Down Expand Up @@ -34,7 +31,7 @@
"wd40": [
{
"name": "Main commands",
"commands": ["rel", "cat", "diag"],
"commands": ["rel"],
}
]
}
Expand Down Expand Up @@ -103,58 +100,3 @@ def rel(ctx, flowcell):
ctx.obj['fexBool'],
ctx.obj['fromAddress']
)


@cli.command()
@click.option(
"--flowcells",
"-f",
required=True,
help='Specify 2 flowcell folders, e.g. -f flowcell1 -f flowcell2',
multiple=True
)
@click.option(
"--project",
"-p",
required=True,
help='project folder. only 1 allowed.'
)
@click.option(
"--output",
"-o",
required=True,
help='folder to write output into.'
)
@click.pass_context
def cat(ctx, flowcells, project, output):
"""combine fastq files of a project sequenced on multiple flow cells."""
if len(flowcells) != 2:
sys.exit("Please specify exactly two flowcells..")
project = os.path.basename(project)
p1 = os.path.join(
ctx.obj['fastqDir'],
os.path.basename(flowcells[0]),
project
)
p2 = os.path.join(
ctx.obj['fastqDir'],
os.path.basename(flowcells[1]),
project
)
if not os.path.exists(p1):
sys.exit('{} not found.'.format(p1))
if not os.path.exists(p2):
sys.exit('{} not found.'.format(p2))
catRun(project, p1, p2, os.path.abspath(output))


@cli.command()
@click.argument(
"flowcell",
default='./',
type=click.Path(exists=True)
)
@click.pass_context
def diag(ctx, flowcell):
"""Diagnose a flowcell."""
diagnose(flowcell, ctx.obj['solDir'])

0 comments on commit c06b512

Please sign in to comment.