Skip to content

Commit

Permalink
improved example files / tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
VascoElbrecht committed Sep 28, 2016
1 parent 2fafb37 commit e70db08
Show file tree
Hide file tree
Showing 28 changed files with 3,544 additions and 22,579 deletions.
51 changes: 0 additions & 51 deletions .Rapp.history

This file was deleted.

Binary file modified Sample_Data/.DS_Store
Binary file not shown.
34 changes: 0 additions & 34 deletions Sample_Data/.Rapp.history

This file was deleted.

Binary file not shown.
600 changes: 600 additions & 0 deletions Sample_Data/1 COI alignments (unprocessed)/1_Plecoptera_sub.fasta

Large diffs are not rendered by default.

600 changes: 600 additions & 0 deletions Sample_Data/1 COI alignments (unprocessed)/2_Trichoptera_sub.fasta

Large diffs are not rendered by default.

600 changes: 600 additions & 0 deletions Sample_Data/1 COI alignments (unprocessed)/3_Ephemeroptera_sub.fasta

Large diffs are not rendered by default.

600 changes: 600 additions & 0 deletions Sample_Data/1 COI alignments (unprocessed)/4_Coleoptera_sub.fasta

Large diffs are not rendered by default.

600 changes: 600 additions & 0 deletions Sample_Data/1 COI alignments (unprocessed)/5_Bivalvia_sub.fasta

Large diffs are not rendered by default.

1,868 changes: 0 additions & 1,868 deletions Sample_Data/1 COi alignments/01_Plecoptera_folmer.fasta

This file was deleted.

3,176 changes: 0 additions & 3,176 deletions Sample_Data/1 COi alignments/02_Ephemeroptera_folmer.fasta

This file was deleted.

3,166 changes: 0 additions & 3,166 deletions Sample_Data/1 COi alignments/03_Trichoptera_folmer_subset.fasta

This file was deleted.

2,288 changes: 0 additions & 2,288 deletions Sample_Data/1 COi alignments/04_Coleoptera_folmer.fasta

This file was deleted.

2,756 changes: 0 additions & 2,756 deletions Sample_Data/1 COi alignments/05_Odonata_folmer.fasta

This file was deleted.

198 changes: 0 additions & 198 deletions Sample_Data/1 COi alignments/06_Megaloptera_folmer.fasta

This file was deleted.

144 changes: 0 additions & 144 deletions Sample_Data/1 COi alignments/07_Turbellaria_folmer.fasta

This file was deleted.

2,144 changes: 0 additions & 2,144 deletions Sample_Data/1 COi alignments/08_Gastropoda_folmer.fasta

This file was deleted.

812 changes: 0 additions & 812 deletions Sample_Data/1 COi alignments/09_Bivalvia_folmer.fasta

This file was deleted.

1,076 changes: 0 additions & 1,076 deletions Sample_Data/1 COi alignments/10_Amphipoda_folmer.fasta

This file was deleted.

604 changes: 0 additions & 604 deletions Sample_Data/1 COi alignments/11_Isopoda_folmer.fasta

This file was deleted.

1,930 changes: 0 additions & 1,930 deletions Sample_Data/1 COi alignments/12_Diptera_folmer_subset.fasta

This file was deleted.

392 changes: 0 additions & 392 deletions Sample_Data/1 COi alignments/13_Polychaeta_folmer.fasta

This file was deleted.

1,544 changes: 0 additions & 1,544 deletions Sample_Data/1 COi alignments/14_Oligochaeta_folmer.fasta

This file was deleted.

386 changes: 0 additions & 386 deletions Sample_Data/1 COi alignments/15_Hirudinea_folmer.fasta

This file was deleted.

Binary file not shown.
36 changes: 26 additions & 10 deletions Sample_Data/package_tutorial.R
Original file line number Diff line number Diff line change
@@ -1,40 +1,56 @@
# Feel free to contact Vasco Elbrecht if you run into issues (twitter: @luckylionde). Enjoy!


setwd("~/Desktop/PrimerMiner-master 4") # set the path to the PrimerMinder folder you just downloaded
# set the path to the PrimerMinder folder you just downloaded
setwd("~/Desktop/PrimerMiner-master 5")

# install the PrimerMiner package icl dependencies
install.packages("PrimerMiner", repos = NULL, type="source", dependencies=T)

# load the package into R
library("PrimerMiner")

# Set path to sample data
setwd("Sample_Data")

# creating configuration file and batch downloading reads
batch_config("config.txt")

# batch download and process sequence data
batch_download("taxa_small.csv", "config.txt")

##############
#Now you have to create alignments from the consensus OTU files! Please see manuals on github for more infos (not available jet!)
##############
#You have to generate and manually check the alignment! Only extract the region amplified by the primers (+2 * the primer length on each side). We recommend Geneious for doing this!

# You find 5 sample alignments generated with Geneious in the folder "1 COI alignments (unprocessed)". We will use these in the next steps of this tutorial.

# get alignments to process
fastafiles <- list.files("1 COI alignments (unprocessed)", full.names=T)

# define name and folder to save files in
fastafiles_export <- paste("2 COI alignments (processed)", list.files("1 COI alignments (unprocessed)"), sep="/")

# process files! This function will remove gaps from the alignments and and apply selective trimming to the primer rgions
for (i in 1:length(fastafiles)){
selectivetrim(fastafiles[i], fastafiles_export[i], trimL=25, trimR=26, gaps=0.10, minsequL=100)
}

# plot all alignments for manual primer finding!
alignments <- list.files("1 COi alignments", full.name=T) # find files

pdf("primer_plot_complete.pdf", height=6, width=100)
plot_alignments(alignments, Order_names=gsub(".*ts/.._(.*)_.*", "\\1", alignments))
# The processed gap free alignemts can now be plotted with PrimerMiner or processed with third party primer development software
# Make sure to chekc that all alignemts have the same length (are aligned)
alignments <- list.files("2 COI alignments (processed)", full.name=T) # find files

pdf("plot_alignments.pdf", height=4, width=100)
plot_alignments(alignments, Order_names=gsub(".*./._(.*)_.*", "\\1", alignments))
dev.off()




# in silico primer evaluation

evaluate_primer("1 COi alignments/01_Plecoptera_folmer.fasta", "GCYCCHGAYATRGCHTTYCC", 218, 237, save="save_evaluation_table.csv", mm_position ="primer_scoring/Position_v1.csv", adjacent=2, mm_type="primer_scoring/Type_v1.csv")
evaluate_primer("primer_scoring/01_Plecoptera_subset.fasta", "GGTCAACAAATCATAAAGATATTGG", 1, 25, save="save_evaluation_table_LCO.csv", mm_position ="primer_scoring/Position_v1.csv", adjacent=2, mm_type="primer_scoring/Type_v1.csv")


evaluate_primer("primer_scoring/01_Plecoptera_subset.fasta", "ARYATDGTRATDGCHCCDGC", 585, 604, save="save_evaluation_table_BR1.csv", mm_position ="primer_scoring/Position_v1.csv", adjacent=2, mm_type="primer_scoring/Type_v1.csv", forward=F)



Expand Down
Binary file added Sample_Data/plot_alignments.pdf
Binary file not shown.
Loading

0 comments on commit e70db08

Please sign in to comment.