Learn R Programming

CNEr (version 1.8.3)

saveCNEToSQLite-methods: saveCNEToSQLite function

Description

This function save the CNE results into a local SQLite database.

Usage

saveCNEToSQLite(CNE, dbName, tableName, overwrite=FALSE)

Arguments

CNE
An object of data.frame, the CNE data table or an object of CNE.
dbName
An object of character, the path of the local SQLite database.
tableName
An object of character, the name of table for this CNE data table, or missing when CNE is an object of CNE.
overwrite
An object of boolean, whether or not to overwrite the table with same table name.

Details

The input CNE table should have the colnames "chr1", "start1", "end1", "chr2", "start2", "end2", "strand", "similarity", "cigar". After the bin indexing, two additional columns "bin1" and "bin2" will be added before the column "chr1" and "chr2", respectively. If the input CNE is a CNE object, the tableName will be a combination of assembly names and thresholds. For instance, "danRer7_hg19_49_50" for "hg19" and "danRer7" with threshold "49_50".

Examples

Run this code
  dbName = tempfile()
  data(cneBlatedDanRer7Hg19)
  for(i in 1:length(cneBlatedDanRer7Hg19)){
    tableName = paste("danRer7_hg19", names(cneBlatedDanRer7Hg19)[i],
                      sep="_")
    saveCNEToSQLite(cneBlatedDanRer7Hg19[[i]], dbName, tableName, 
                    overwrite=TRUE)
  }
  data(finalCNE)
  saveCNEToSQLite(finalCNE, dbName=dbName, overwrite=TRUE)

Run the code above in your browser using DataLab