Question: tximport: kallisto .h5 files not recognized as such when they have a different name
1
gravatar for Lucas Carey
3 months ago by
Lucas Carey40
Lucas Carey40 wrote:

I have a kalliso-created abundance.h5 file but the filename (ES_1_high_28881_CGATGT_abundance.h5) includes information about the sample. When I try to import this file using tximport v1.10.0 I get an error. tximport thinks that the file is a .tsv file. 

However, if I create a symlink named abundance.h5, I can load that perfectly well. 

Is there a way to tell tximport that the file really is a kallisto h5 file? 

-Lucas

 

data <- tximport( 'ES_1_high_28881_CGATGT_abundance.h5' , type = "kallisto" , tx2gene=tx2gene , ignoreAfterBar=TRUE )
Note: importing `abundance.h5` is typically faster than `abundance.tsv`
reading in files with read_tsv
1 Error in read_tokens_(data, tokenizer, col_specs, col_names, locale_,  :
  embedded nul in string: '\0\xfbLΦ(\x98Hr1'
In addition: Warning message:
Unnamed `col_types` should have the same length as `col_names`. Using smaller of the two.

> system('ln -s ES_1_high_28881_CGATGT_abundance.h5 abundance.h5')

> data <- tximport( 'abundance.h5' , type = "kallisto", tx2gene=tx2gene , ignoreAfterBar=TRUE )
1
summarizing abundance
summarizing counts
summarizing length
summarizing inferential replicates
tximport kallisto • 182 views
ADD COMMENTlink modified 3 months ago by Gordon Smyth37k • written 3 months ago by Lucas Carey40
Answer: C: tximport: kallisto .h5 files not recognized as such when they have a different n
1
gravatar for Lucas Carey
3 months ago by
Lucas Carey40
Lucas Carey40 wrote:

Always something about posting to a forum that makes me find an answer. 

This works, but is messy: 

1. load the function read_kallisto_h5() from tximport helper.R

2. set importer=read_kallisto_h5

data <- tximport(  'ES_1_high_28881_CGATGT_abundance.h5' , type = "kallisto", txOut = FALSE , tx2gene=tx2gene , ignoreAfterBar=TRUE , importer = read_kallisto_h5 )

 

ADD COMMENTlink written 3 months ago by Lucas Carey40
Answer: tximport: kallisto .h5 files not recognized as such when they have a different n
0
gravatar for Gordon Smyth
3 months ago by
Gordon Smyth37k
Walter and Eliza Hall Institute of Medical Research, Melbourne, Australia
Gordon Smyth37k wrote:

kallisto creates a directory for each RNA sample. I would suggest that you don't rename any of the kallisto output files in the directory, because downstream functions like tximport, edgeR::catchKallisto and Sleuth assume the files have standard names. Instead, just rename the directory itself to have an informative name.

ADD COMMENTlink modified 3 months ago • written 3 months ago by Gordon Smyth37k

Yes. Also the tximeta package looks within the directories for specific files with useful metadata about the experiment and the transcripts (particularly in the case of Salmon output). Best to leave the directories unchanged as Gordon says, and only rename the directory.

ADD REPLYlink modified 3 months ago • written 3 months ago by Michael Love22k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 195 users visited in the last hour