Skip to content

Commit

Permalink
Merge pull request #115 from broadinstitute/dp-nextstrain
Browse files Browse the repository at this point in the history
add snp-sites task to nextstrain workflows
  • Loading branch information
dpark01 committed Jun 11, 2020
2 parents 95d4550 + 80370a3 commit 1dc7d04
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 23 deletions.
24 changes: 24 additions & 0 deletions pipes/WDL/tasks/tasks_nextstrain.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,30 @@ task augur_mafft_align {
}
}
task snp_sites {
input {
File msa_fasta
String docker = "quay.io/biocontainers/snp-sites:2.5.1--hed695b0_0"
}
String out_basename = basename(msa_fasta, ".fasta")
command {
snp-sites -V > VERSION
snp-sites -v -o ~{out_basename}.vcf ~{msa_fasta}
}
runtime {
docker: docker
memory: "1 GB"
cpu : 1
disks: "local-disk 50 HDD"
preemptible: 0
dx_instance_type: "mem1_ssd1_v2_x2"
}
output {
File snps_vcf = "~{out_basename}.vcf"
String snp_sites_version = read_string("VERSION")
}
}
task augur_mask_sites {
meta {
description: "Mask unwanted positions from alignment or SNP table. See https://nextstrain-augur.readthedocs.io/en/stable/usage/cli/mask.html"
Expand Down
1 change: 0 additions & 1 deletion pipes/WDL/workflows/augur_from_beast_mcc.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ workflow augur_from_beast_mcc {

output {
File beast_mcc_tree_newick = augur_import_beast.tree_newick
File node_data_json = augur_import_beast.node_data_json
File auspice_input_json = export_auspice_json.virus_json
}
}
14 changes: 4 additions & 10 deletions pipes/WDL/workflows/augur_from_msa.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,9 @@ workflow augur_from_msa {
}

output {
File masked_fasta = augur_mask_sites.masked_sequences
File raw_tree = draft_augur_tree.aligned_tree
File refined_tree = refine_augur_tree.tree_refined
File branch_lengths = refine_augur_tree.branch_lengths
File json_nt_muts = ancestral_tree.nt_muts_json
File ancestral_sequences_fasta = ancestral_tree.sequences
File json_aa_muts = translate_augur_tree.aa_muts_json
File? node_clade_data_json = assign_clades_to_nodes.node_clade_data_json
File? json_ancestral_traits = ancestral_traits.node_data_json
File auspice_input_json = export_auspice_json.virus_json
File masked_alignment = augur_mask_sites.masked_sequences
File ml_tree = draft_augur_tree.aligned_tree
File time_tree = refine_augur_tree.tree_refined
File auspice_input_json = export_auspice_json.virus_json
}
}
23 changes: 11 additions & 12 deletions pipes/WDL/workflows/build_augur_tree.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ workflow build_augur_tree {
ref_fasta = ref_fasta,
basename = virus
}
call nextstrain.snp_sites {
input:
msa_fasta = augur_mafft_align.aligned_sequences
}
call nextstrain.augur_mask_sites {
input:
sequences = augur_mafft_align.aligned_sequences
Expand Down Expand Up @@ -125,17 +129,12 @@ workflow build_augur_tree {
}

output {
File combined_assembly_fasta = concatenate.combined
File augur_aligned_fasta = augur_mafft_align.aligned_sequences
File masked_fasta = augur_mask_sites.masked_sequences
File raw_tree = draft_augur_tree.aligned_tree
File refined_tree = refine_augur_tree.tree_refined
File branch_lengths = refine_augur_tree.branch_lengths
File json_nt_muts = ancestral_tree.nt_muts_json
File ancestral_sequences_fasta = ancestral_tree.sequences
File json_aa_muts = translate_augur_tree.aa_muts_json
File? node_clade_data_json = assign_clades_to_nodes.node_clade_data_json
File? json_ancestral_traits = ancestral_traits.node_data_json
File auspice_input_json = export_auspice_json.virus_json
File combined_assemblies = concatenate.combined
File multiple_alignment = augur_mafft_align.aligned_sequences
File unmasked_snps = snp_sites.snps_vcf
File masked_alignment = augur_mask_sites.masked_sequences
File ml_tree = draft_augur_tree.aligned_tree
File time_tree = refine_augur_tree.tree_refined
File auspice_input_json = export_auspice_json.virus_json
}
}

0 comments on commit 1dc7d04

Please sign in to comment.