View source: R/countsToMatrix.R
countsToMatrix | R Documentation |
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.
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.
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.