R/mappings.R

#' Map agains reference genome
map_against_reference_genome <- function(opt) {
  if (!isTRUE(opt$nofilter)) {
    # mapping against HOST
    fc(
      "[MAPPING SEQUENCES AGAINST REFERENCE GENOME - HOST] \n",
      "bowtie -f -S -k 1 -p ", opt$threads, " -v 1 ",
      "--un ", opt$out_path, "step4/unmappedVectorReads.fasta ", opt$ref,
      " ", opt$out_path, "step2/trimmed_filtered_gt15.fasta > /dev/null"
    )
  }
}

#' Filter against bacterial genomes
map_against_bacterial_genomes <- function(opt) {
  if (!isTRUE(opt$nofilter)) {
    # mapping against bacterial genomes
    fc(
      "[MAPPING SEQUENCES AGAINST BACTERIAL GENOMES] \n",
      "bowtie -f -S -v 1 --un ", opt$out_path,
      "step4/unmappedVectorBacters.fasta -k 1 -p ", opt$threads,
      " --large-index ", opt$bact,
      " ", opt$out_path, "step4/unmappedVectorReads.fasta > /dev/null"
    )
  }
}
luciorq/five documentation built on May 21, 2019, 2:30 a.m.