R/RcppExports.R

Defines functions reads read1 alignReadsWithRegion alignReads getPileUp getFastqCount getFastqReads getFastqReadsWithQuality getSRAReadsWithRegion getBamReadsWithRegion getReference refBases readCount2

Documented in alignReads alignReadsWithRegion getBamReadsWithRegion getFastqCount getFastqReads getFastqReadsWithQuality getPileUp getReference getSRAReadsWithRegion read1 readCount2 reads refBases

# This file was generated by Rcpp::compileAttributes
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' The reads in the read collection.
#'
#' This simply returns the full read count.
#'
#' @param acc An accession or a path to an actual SRA file (with .sra suffix)
#' @param n The number of reads to return
#' @return the reads in the collection
#' @export
#' @examples
#' reads('SRR000123')
reads <- function(acc, n, lkup) {
    .Call('SRA2R_reads', PACKAGE = 'SRA2R', acc, n, lkup)
}

#' Example of creating a BStringSet in C++
#'
#'
#' @param acc An accession or a path to an actual SRA file (with .sra suffix)
#' @param n The number of reads to return
#' @param lkup lkup = get_seqtype_conversion_lookup('B','DNA')
#' @return the reads in the collection
#' @export
#' @examples
#' require(Biostrings)
#' lkup = get_seqtype_conversion_lookup('B','DNA')
#' x = SRA2R:::read1('SRR000123',1000,lkup)
#' x
read1 <- function(classname, acc, lkup) {
    .Call('SRA2R_read1', PACKAGE = 'SRA2R', classname, acc, lkup)
}

#' Read alignment
#'
#' This returns the aligned reads.
#'
#' @param acc An accession or a path to an actual SRA file (with .sra suffix)
#' @param ref The reference name 
#' @param start Start position (inclusive)
#' @param stop End position (inclusive)
#' @return aligned reads
#' @export
#' @examples
#' alignReadsWithRegion('SRR789392','NC_000020.10', 62926240, 62958722)
#' alignReadsWithRegion('SRR789334','NC_000020.10', 62926240, 62958722)
alignReadsWithRegion <- function(acc, refname, start, stop) {
    .Call('SRA2R_alignReadsWithRegion', PACKAGE = 'SRA2R', acc, refname, start, stop)
}

#' Read alignment
#'
#' This returns the aligned reads.
#'
#' @param acc An accession or a path to an actual SRA file (with .sra suffix)
#' @return aligned reads
#' @export
#' @examples
#' alignReads('SRR789392')
#' alignReads('SRR789334')
alignReads <- function(acc) {
    .Call('SRA2R_alignReads', PACKAGE = 'SRA2R', acc)
}

#' The readCount in the read collection.
#'
#' This simply returns the full read count.
#' @author Nick Bernstein
#' @param acc An accession or a path to an actual SRA file (with .sra suffix)
#' @param refname Reference name for pile up
#' @param start An in for position of start of pileup
#' @param stop An in for position of stop of pileup
#' @param MinPileUpDepth Coverage required
#' @return the number of reads in the collection
#' @export
#' @examples
#' getPileUp('SRR390728')
getPileUp <- function(acc, refname, start = 1L, stop = 0L, MinPileUpDepth = 0L, Quality = FALSE) {
    .Call('SRA2R_getPileUp', PACKAGE = 'SRA2R', acc, refname, start, stop, MinPileUpDepth, Quality)
}

#' The readCount in the read collection.
#'
#' This simply returns the full read count.
#'
#' @param acc An accession or a path to an actual SRA file (with .sra suffix)
#' @return the number of reads in the collection
#' @export
#' @examples
#' getFastqCount('SRR000123')
getFastqCount <- function(acc) {
    .Call('SRA2R_getFastqCount', PACKAGE = 'SRA2R', acc)
}

#' The reads in the read collection.
#'
#' This returns the all reads.
#'
#' @param acc An accession or a path to an actual SRA file (with .sra suffix)
#' @param n The number of reads to return
#' @return the reads in the collection
#' @export
#' @examples
#' getFastqReads('SRR000123',10)
getFastqReads <- function(acc, max_num_reads) {
    .Call('SRA2R_getFastqReads', PACKAGE = 'SRA2R', acc, max_num_reads)
}

#' The reads in the read collection.
#'
#' This returns the all reads.
#'
#' @param acc An accession or a path to an actual SRA file (with .sra suffix)
#' @param n The number of reads to return
#' @return the reads in the collection
#' @export
#' @examples
#' getFastqReadsWithQuality('SRR000123',10)
getFastqReadsWithQuality <- function(acc, max_num_reads) {
    .Call('SRA2R_getFastqReadsWithQuality', PACKAGE = 'SRA2R', acc, max_num_reads)
}

#' The reads in the specified region in an SRA record.
#'
#' This returns the all reads in the specified region.
#'
#' @param acc An accession or a path to an actual SRA file (with .sra suffix)
#' @param ref The reference name 
#' @param start Start position (inclusive)
#' @param stop End position (inclusive)
#' @return the reads in the collection
#' @export
#' @examples
#' getSRAReadsWithRegion('SRR789392','NC_000020.10', 62926240, 62958722)
getSRAReadsWithRegion <- function(acc, refname, start, stop) {
    .Call('SRA2R_getSRAReadsWithRegion', PACKAGE = 'SRA2R', acc, refname, start, stop)
}

#' The reads in the specified region in an SRA record.
#'
#' This returns the all reads in the specified region.
#'
#' @param acc An accession or a path to an actual SRA file (with .sra suffix)
#' @param ref The reference name 
#' @param start Start position (inclusive)
#' @param stop End position (inclusive)
#' @return the reads in the collection
#' @export
#' @examples
#' getBamReadsWithRegion('SRR789392','NC_000020.10', 62926240, 62958722)
getBamReadsWithRegion <- function(acc, refname, start, stop) {
    .Call('SRA2R_getBamReadsWithRegion', PACKAGE = 'SRA2R', acc, refname, start, stop)
}

#' The readCount in the read collection.
#'
#' This simply returns the full read count.
#'
#' @param acc An accession or a path to an actual SRA file (with .sra suffix)
#' @return the number of reads in the collection
#' @export
#' @examples
#' getReference('SRR390728')
getReference <- function(acc) {
    .Call('SRA2R_getReference', PACKAGE = 'SRA2R', acc)
}

#' The readCount in the read collection.
#'
#' This simply returns the full read count.
#'
#' @param acc An accession or a path to an actual SRA file (with .sra suffix)
#' @return the number of reads in the collection
#' @export
#' 
NULL

refBases <- function(acc) {
    .Call('SRA2R_refBases', PACKAGE = 'SRA2R', acc)
}

#' The readCount in the read collection.
#'
#' This simply returns the full read count.
#'
#' @param acc An accession or a path to an actual SRA file (with .sra suffix)
#' @return the number of reads in the collection
#' @export
#' @examples
#' readCount('SRR000123')
readCount2 <- function(acc) {
    .Call('SRA2R_readCount2', PACKAGE = 'SRA2R', acc)
}
NCBI-Hackathons/SRA2R documentation built on May 7, 2019, 5:18 p.m.