forked from PennChopMicrobiomeProgram/16S_QIIME2
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request junglee0713#18 from scottdaniel/master
added dada2 + more
- Loading branch information
Showing
80 changed files
with
106 additions
and
8,187 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
all: | ||
project_dir: "/home/danielsg/16S_QIIME2/test" | ||
mux_dir: "/home/danielsg/16S_QIIME2/test/multiplexed_fastq" | ||
project_dir: "/home/danielsg/16S_QIIME2/test" | ||
mux_dir: "multiplexed_fastq" | ||
mapping: "test_mapping_file.tsv" | ||
admin_email: "[email protected]" | ||
|
||
#try revcomp if you are getting 0 reads when demultiplexing | ||
demux: | ||
mismatch: 0 | ||
revcomp: false | ||
|
@@ -16,7 +17,7 @@ denoise: | |
n_threads: 6 | ||
|
||
taxonomy: | ||
classifier_fp: "/home/danielsg/16S_QIIME2/QIIME2_data/gg-13-8-99-nb-classifier.qza" | ||
classifier_fp: "/home/danielsg/16S_QIIME2/QIIME2_data/gg-13-8-99-nb-classifier.qza" | ||
|
||
diversity: | ||
sampling_depth: 30 | ||
|
@@ -25,8 +26,13 @@ unassign: | |
unassigner_species_fp: "/home/danielsg/16S_QIIME2/unassign_data/unassigner_species.fasta" | ||
|
||
report: | ||
study_group_var: "Investigator" | ||
study_group_var: "investigator" | ||
min_reads: 5 | ||
richness_subsample_size: 20 | ||
rmd: "/home/danielsg/16S_QIIME2/scripts/Basic_Bioinformatics_Report.Rmd" | ||
R_helper: "/home/danielsg/16S_QIIME2/scripts/helper_functions.R" | ||
R_helper: "/home/danielsg/16S_QIIME2/scripts/helper_functions.R" | ||
report_rdata: "/home/danielsg/16S_QIIME2/test/report.RData" # rmd can only have one output so have to put this here | ||
|
||
dada2: | ||
rscript: "/home/danielsg/16S_QIIME2/scripts/dada2.R" | ||
species_training_set: "/home/danielsg/16S_QIIME2/dada2_data/rdp_species_assignment_16.fa.gz" |
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
rule all_dada2_species: | ||
input: | ||
TARGET_DADA2SP | ||
|
||
rule dada2_assignSpecies: | ||
input: | ||
DENOISE_DIR + "/representative_seq_fasta/dna-sequences.fasta" | ||
output: | ||
dada2_output = DENOISE_DIR + "/representative_seq_fasta/dada2/dada2_species_assignments.tsv", | ||
dada2_rdata = DENOISE_DIR + "/representative_seq_fasta/dada2/dada2.RData" | ||
script: | ||
str(config["dada2"]["rscript"]) |
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
Binary file not shown.
Binary file not shown.
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,35 @@ | ||
#!/usr/bin/env Rscript | ||
|
||
library(tidyverse) | ||
library(Biostrings) | ||
library(dada2) | ||
|
||
#from config.yml | ||
|
||
rdp_species <- snakemake@config[["dada2"]][["species_training_set"]] | ||
|
||
#from dada2.rules | ||
|
||
my_seqs <- readDNAStringSet(snakemake@input[[1]]) | ||
|
||
#main | ||
|
||
seqs_df <- tibble(query_id = names(my_seqs), | ||
sequence = as.character(my_seqs)) | ||
|
||
set.seed(100) # Initialize random number generator for reproducibility | ||
|
||
genus.species <- assignSpecies(seqs_df$sequence, rdp_species) | ||
|
||
genspec_df <- genus.species %>% | ||
as.data.frame() %>% | ||
rownames_to_column(var = "sequence") %>% | ||
inner_join(seqs_df, by = "sequence") %>% | ||
mutate(species = paste0(Genus, " ", Species)) %>% #making same as unassigner output | ||
select(query_id, species, sequence) | ||
|
||
#from dada2.rules and targets.rules | ||
|
||
save.image(file = snakemake@output[["dada2_rdata"]]) | ||
|
||
write_tsv(x = genspec_df, path = snakemake@output[["dada2_output"]]) |
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.