Description Usage Arguments Value Examples
View source: R/countsToMatrix.R
The function merges in a matrix the information in the count files. It can be used from 1 to N count files. These count files can be created by using the function rawAlignment
with the raw files of RNA-seq.
1 | countsToMatrix(csvFile, sep = ",", extension = "")
|
csvFile |
The csv that contains the name and the path to each of the count files. The column of the name of the file must be named Run and the column that contains the paths must be named Path. Furthermore, to facilitate the posterior steps, a column named Class that contains the classes for the samples must be required. |
sep |
The separator character of the csvFile or tsvFile. |
extension |
The extension of the count file. Set to count by default. |
A matrix with the ensembl ID in the rows and all the samples of each count files in the columns.
1 2 3 4 5 6 7 8 9 10 11 12 13 | dir <- system.file("extdata", package="KnowSeq")
countsInfo <- read.csv(paste(dir,"/countFiles/mergedCountsInfo.csv",sep = ""))
countsInfo$Path <- paste(dir,"/countFiles/",countsInfo$Run,sep = "")
write.csv(countsInfo, file = "countsInfo.csv")
countsInformation <- countsToMatrix("countsInfo.csv", extension = 'count')
countsMatrix <- countsInformation$countsMatrix
labels <- countsInformation$labels
file.remove("countsInfo.csv")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.