-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update default_params.config Added the site_representation_cutoff * Create variant_table_to_fasta.py Added the script which replace the sed commands used to create the fasta file for phylogeny * Update default_params.config Moved site representation to EXPERIENCED USERS section * Added the resistance database for TBProfiler version 5 * Update magma-env-1.yml * Update setup_conda_envs.sh * Update default_params.config * Update build.sh * Update Dockerfile * Update summarize_resistance.py Added the command line argument for the structural variant results directory. They are not yet added to the summary file, as this requires testing with real data. * replace sed -> python scripts [ci skip] * tweak for python2 [ci skip] * document the different GVCF files * fix typo [ci skip] * Added the structural variant workflow and the resistance profiling of these variants. * cleanup * Update setup_conda_envs.sh * Update default_params.config * Update rename_vcf_chrom.py * Update rename_vcf_chrom.py * interim commit [ci skip] * tweak variants to fasta [ci skip] * accommodate the new design for structural variants [ci skip] * fix imports [ci skip] * fix input to workflow [ci skip] * dev [ci skip] * dev [ci skip] * build and push new containers for v1.1.1 [ci skip] * Fixed the summarize resistance script and added the strcutural variants to it * add back the bc dependency [ci skip] * Update magma-env-1.yml MAke sure to use xlsxwriter 3.1.1 * minimal change, add bc to container-2 only [ci skip] * Update CHANGELOG.md * Changed the permissions on some files * Fixed a typo in the script causing structural variants to not shoiw up * add the default lineage reference files GVCF [ci skip] * tweak comments [ci skip] * tweak comments in the config file [ci skip] * fixed the filtering bug * finilize filtering bug fix * added sample filtering for the structural variant workflow * Update structural_variants_analysis_wf.nf * Moved the vcf filenames from bcftools merge into a file such that the command does not become impossibly long * Added multithreading to tbprofiler * Fixed it that the file listing samples actually contains the newlines * removed sorting from merge channels * Fixed bug in the bcftools merge where the input file was uanavailble on AWS * tweak the readme [ci skip] * add params specific to iqtree [ci skip] * Update iqtree.nf fixed flag for standard bootstrapping * switch the script to python3 [ci skip] * add view for file filtering logic [ci skip] * refactor the location of view [ci skip] * refactor the location of view [ci skip] * refactor the location of view [ci skip] * revert to binary invocation of the script in SNPEFF [ci skip] * use generic python [ci skip] --------- Co-authored-by: LennertVerboven <lennert.verboven@uantwerpen.be> Co-authored-by: Tim H. Heupink <tim.heupink@uantwerpen.be> Co-authored-by: vrennie <113892099+vrennie@users.noreply.github.com>
- Loading branch information
1 parent
86f2188
commit c84ee9e
Showing
48 changed files
with
18,834 additions
and
4,594 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Created a parallel workflow for mapping without using the strict seed lenght for use in the structural variant workflow. | ||
|
||
Updated TBProfiler to version 5.0.0 and recreated the resistance database to work with the the new version | ||
|
||
Updated the summarize resistance script to include the structural variants in the excel output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#! /usr/bin/env python3 | ||
|
||
import sys | ||
import argparse | ||
|
||
def main(args): | ||
table = [] | ||
with open(args.table, 'r') as table_file: | ||
table.append(table_file.readline().strip().split('\t')) # Get the headerline without modifying | ||
# Process the actual variants | ||
for idx, l in enumerate(table_file): | ||
l = l.strip().split('\t') | ||
l = [i.replace('*', '-').replace('.', '-') for i in l] | ||
if l.count('-')/len(l) < (1-args.site_representation_cutoff): | ||
table.append(l) | ||
else: | ||
pass | ||
with open(args.output_fasta, 'w') as fasta_file: | ||
for l in list(map(list, zip(*table))): | ||
fasta_file.write('>{}\n{}\n'.format(l[0].replace('.GT', ''), ''.join(l[1:]))) | ||
|
||
|
||
|
||
parser = argparse.ArgumentParser(description='tbprofiler script',formatter_class=argparse.ArgumentDefaultsHelpFormatter) | ||
parser.add_argument('table', type=str, help='The input table to convert (stdin if empty)') | ||
parser.add_argument('output_fasta', type=str, help='The output fasta file') | ||
parser.add_argument('site_representation_cutoff', type=float, help='Minimum fraction of samples that need to have a call at a site before it is considered') | ||
parser.set_defaults(func=main) | ||
args = parser.parse_args() | ||
args.func(args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.