write.files {spliceSites} | R Documentation

## write.files

### Description

Writes table data and sequence in separate files.

### Usage

    write.files(x, path, filename,...)

### Arguments

`x` | caRanges or aaGapSites object for which data is written.
`path` | Path for writing files.
`filename` | Basic filename to which suffixes are added.
`...` | Other arguments passed to "write.table".

### Details

There are two files written: A text file with tabulated values from data.frame (separated by ";") and a fasta file which contains the stored dna sequence.

### Value

None.

### Note

The function tries to create directory 'path' when it does not exist.

### Author(s)

Wolfgang Kaisers

### Examples

    # A) Read gap-sites from BAM-files
    bam<-system.file("extdata","rna_fem.bam",package="spliceSites")
    reader<-bamReader(bam,idx=TRUE)
    ga<-alignGapList(reader)
    bamClose(reader)
    # B) Load DNA sequence
    dnafile<-system.file("extdata","dna_small.RData",package="spliceSites")
    load(dnafile)
    # C) Add DNA sequence
    lj<-lJunc(ga,featlen=21,gaplen=21,strand='+')
    ljc<-lCodons(lj,frame=1,keepStrand=TRUE)
    cdr<-dnaRanges(ljc,dna_small)
    # D) Translate DNA to amino-acid
    ar<-translate(cdr)
    # E) Write "ar.csv" and "ar.fa"
    # write.files(ar,".","ar")

[Package spliceSites version 1.28.0 Index]