easyRNASeq coverage methods {easyRNASeq} | R Documentation

## Compute the coverage from a Short Read Alignment file

### Description

Computes the genomic reads' coverage from a read file in bam format or any format supported by ShortRead.

### Usage

    ## S4 method for signature 'RNAseq'
    fetchCoverage(
      obj,
      format = c("aln", "bam"),
      filename = character(1),
      filter = srFilter(),
      type = "SolexaExport",
      chr.sel = c(),
      validity.check = TRUE,
      chr.map = data.frame(),
      ignoreWarnings = FALSE,
      gapped = TRUE,
      paired = FALSE,
      stranded = FALSE,
      bp.coverage = FALSE,
      ...
    )

### Arguments

`obj` | An `RNAseq` object
`format` | The format of the reads, one of "aln","bam". If not "bam", all the types supported by the ShortRead package are supported too.
`filename` | The full path of the file to use
`filter` | The filter to be applied when loading the data using the "aln" format
`type` | The type of data when using the "aln" format. See the ShortRead package.
`chr.sel` | A vector of chromosome names to subset the final results.
`validity.check` | Shall UCSC chromosome name convention be enforced
`chr.map` | A data.frame describing the mapping of original chromosome names towards wished chromosome names. See details.
`ignoreWarnings` | set to TRUE (bad idea! they have a good reason to be there) if you do not want warning messages.
`gapped` | Is the bam file provided containing gapped alignments?
`paired` | Is the bam file containing PE reads?
`stranded` | Is the bam file from a strand specific protocol?
`bp.coverage` | a boolean that default to FALSE to decide whether coverage is to be calculated and stored by bp
`...` | additional arguments. See details

### Details

... for fetchCoverage: Can be used for readAligned method from package ShortRead. The use of the dots for the scanBamFlag method from package Rsamtools has been deprecated, as were the 'what' and 'isUnmappedQuery' argument to the function

### Value

An `RNAseq` object. The slot readCoverage contains a SimpleRleList object representing a list of coverage vectors, one per chromosome.

### Author(s)

Nicolas Delhomme

### See Also

`Rle` `ShortRead:readAligned`

### Examples

      ## Not run:
    	library("RnaSeqTutorial")
    	library(BSgenome.Dmelanogaster.UCSC.dm3)

    	obj <- new('RNAseq',
    		organismName="Dmelanogaster",
    		readLength=36L,
    		chrSize=as.list(seqlengths(Dmelanogaster))
    		)

    	obj <- fetchCoverage(
    			obj,
    			format="bam",
                            filename=system.file(
    				"extdata",
    				"ACACTG.bam",
                                	package="RnaSeqTutorial")
    			)

    ## End(Not run)

[Package easyRNASeq version 2.24.1 Index]