Skip to content

Commit

Permalink
duplicate primers to number of files
Browse files Browse the repository at this point in the history
  • Loading branch information
VascoElbrecht committed Jun 16, 2017
1 parent 12b346a commit 0807e69
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions JAMP/R/Cutadapt.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ Core(module="Cutadapt")
cat(file="../log.txt", c("Module Version: v0.1", "\n"), append=T, sep="\n")

# cutadapt version
temp <- paste("Util Version: ", "Cutadapt v", system2("cutadapt", "--v", stdout=T, stderr=T), sep="")
temp <- paste("Using Version: ", "Cutadapt v", system2("cutadapt", "--v", stdout=T, stderr=T), sep="")
message(temp)
cat(file="../log.txt", temp, append=T, sep="\n")
message(" ")


if (files=="latest"){
if (files[1]=="latest"){
source("robots.txt")
files <- list.files(paste("../", last_data, "/_data", sep=""), full.names=T)
}
Expand All @@ -25,6 +25,17 @@ new_names <- sub(".fast", "_cut.fast", new_names)
primers <- read.csv(paste(system.file(package="JAMP"), "/primers.csv", sep=""), stringsAsFactors=F)


# match primer number to number of files!

if(length(files)>1 & length(forward)==1){
forward <- rep(forward, length(files))
}
if(length(files)>1 & length(reverse)==1){
reverse <- rep(reverse, length(files))
}



# replace primer name with sequence
if(length(forward)==1){
fw <- primers$Primer_Sequence[primers$Primer_Name==forward]
Expand Down

0 comments on commit 0807e69

Please sign in to comment.