Hi I am using tximport to make a matrix of all TPM values, I have TSV files for many samples, which looks like:
Gene ID Gene Name Reference Strand Start End Coverage FPKM TPM ENSG00000187961.13 KLHL17 chr1 + 960587 965715 4,714223 2,219789 5,030543 ENSG00000187583.10 PLEKHN1 chr1 + 966497 975865 3,669177 2,59782 5,887248 ENSG00000187642.9 PERM1 chr1 - 975204 982093 1,092457 0,444985 1,008436
I have performed these commands:
all(file.exists(samples)) [1] TRUE tmp <- readtsv(samples[1]) Parsed with column specification: cols(
Gene ID
= colcharacter(),Gene Name
= colcharacter(), Reference = colcharacter(), Strand = colcharacter(), Start = coldouble(), End = coldouble(), Coverage = coldouble(), FPKM = coldouble(), TPM = coldouble() ) tx2gene <- tmp[, c("Gene ID", "Gene Name")] txi <- tximport(samples, type = "kallisto", tx2gene = tx2gene, ignoreTxVersion = TRUE) Note: importingabundance.h5
is typically faster thanabundance.tsv
reading in files with read_tsv 1 Warning: 78724 parsing failures. row col expected actual file ... ......... .......... ......... ......................................................................... See problems(...) for more details.
Error in tximport(samples, type = "kallisto", tx2gene = tx2gene, ignoreTxVersion = TRUE) :
all(c(abundanceCol, countsCol, lengthCol) %in% names(raw)) is not TRUE
In addition: Warning message:
Unnamed col_types
should have the same length as col_names
. Using smaller of the two.
After running this command, I have noticed that the TSV files have different row lengths i.e. some files contains 19682 genes, some contains 19684 genes,, so the number of rows are different in each file..
So I want to ask if there is a way to ignore this parameter or any other solution to this problem? Thanks
In total, I have only 9 columns in my TSV files : Gene ID, Gene Name, Reference, Strand, Start, End, Coverage, FPKM, TPM.. I do not have countsCol and lengthCol in stead I have Coverage .. I want to extract the last two columns in my TSV files i.e. FPKM and TPM .. to form a matrix..