R/FastQCShortRead_Functions.R

Defines functions qcShortRead

qcShortRead <- function(fastqs,reportOutDir=getwd()){
  qaSamples <- lapply(fastqs,qa)
  names(qaSamples) <- gsub("\\.fastq.*|\\.fq.*|\\.fq|\\.fastq","",basename(fastqs))
  reportOutFiles <- lapply(names(qaSamples),function(x){
    report(qaSamples[[x]],dest = file.path(reportOutDir,x))
  })
  links <- file.path(reportOutDir,names(qaSamples))
  links <- paste0("<a href='",
                  (file.path(links,"index.html")),"'>",
                  names(qaSamples),"</a>")
  qaSampleFrame <- do.call(ShortRead::rbind,qaSamples)
  fqQCTable <- data.frame(SampleNames=links,
                          as.data.frame(qaSampleFrame@.srlist$readCounts
                          ))
  return(list(FQQC_Table = fqQCTable,ShortReadQC=qaSampleFrame))
}

Try the basecallQC package in your browser

Any scripts or data that you put into this service are public.

basecallQC documentation built on Nov. 8, 2020, 8:03 p.m.