Skip to content

Commit

Permalink
Added functionality for exclusion file
Browse files Browse the repository at this point in the history
  • Loading branch information
Roxanne Wolthuis committed Jun 9, 2022
1 parent 2172572 commit 524857e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
8 changes: 8 additions & 0 deletions bin/python_scripts/collect_user_arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,14 @@ def collect_arguments(self):
help = f"Full scientific name of the species sample, use underscores not spaces. If the species that you are looking for is not available choose 'other'. Options:{self.species_options}",
choices = self.species_options
)
parser.add_argument(
'-ex',
'--exclusionfile',
type=pathlib.Path,
metavar='FILE',
dest="exclusion_file",
help='Path to the file that contains samplenames to be excluded.'
)
parser.add_argument(
"--resfinder_min_coverage",
type=float,
Expand Down
2 changes: 1 addition & 1 deletion envs/juno_amr_master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ dependencies:
- pip:
- PyYAML==5.3.1
- tabulate==0.8.0
- "--editable=git+https://github.com/RIVM-bioinformatics/base_juno_pipeline.git@v0.2.6#egg=base_juno"
- "--editable=git+https://github.com/RIVM-bioinformatics/base_juno_pipeline.git@exclusion_file#egg=base_juno"
4 changes: 4 additions & 0 deletions juno-amr.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def __init__(self,
input_dir,
output_dir,
species,
exclusion_file,
resfinder_min_coverage=0.6,
resfinder_identity_threshold=0.8,
db_dir = "/mnt/db/juno-amr",
Expand Down Expand Up @@ -71,6 +72,7 @@ def __init__(self,

# Specific Juno-AMR pipeline attributes
self.species = species
self.exclusion_file = exclusion_file
self.resfinder_min_coverage=resfinder_min_coverage
self.resfinder_identity_threshold= resfinder_identity_threshold
self.run_pointfinder=run_pointfinder
Expand Down Expand Up @@ -98,6 +100,7 @@ def write_userparameters(self):
config_params = {'input_dir': str(self.input_dir),
'output_dir': str(self.output_dir),
'species': str(self.species),
'exclusion_file': str(self.exclusion_file),
'run_pointfinder': str(self.run_pointfinder),
'resfinder_min_coverage': self.resfinder_min_coverage,
'resfinder_identity_threshold': self.resfinder_identity_threshold,
Expand Down Expand Up @@ -128,6 +131,7 @@ def run_juno_amr_pipeline(self):
JunoAmrRun(input_dir = args.input_dir,
output_dir = args.output_dir,
species=args.species,
exclusion_file = args.exclusion_file,
run_pointfinder=args.run_pointfinder,
db_dir = args.db_dir,
resfinder_min_coverage = args.resfinder_min_coverage,
Expand Down

0 comments on commit 524857e

Please sign in to comment.