Skip to content

Commit

Permalink
purge cat /diag modes under wd40 (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
WardDeb authored Aug 7, 2024
2 parents dc0db11 + fc7ddf3 commit 4cfadb7
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 266 deletions.
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 4cfadb7

Please sign in to comment.