pachterlab / sleuth

Differential analysis of RNA-Seq
http://pachterlab.github.io/sleuth
GNU General Public License v3.0
305 stars 95 forks source link

Normalizing Kallisto abundances with sleuth #266

Open ShwetaCh opened 2 years ago

ShwetaCh commented 2 years ago

Hello, Sleuth team @warrenmcg @pimentel

I've been using Kallisto and Sleuth for a short while, and it works well for me, so thank you for these tools!

I do want to confirm that I'm running Sleuth appropriately for my goal of normalizing Kallisto quant data. I basically use the function below to be able to get between sample normalized gene level TPM data:

so <- sleuth_prep(s2c,
extra_bootstrap_summary = TRUE, target_mapping = t2g, read_bootstrap_tpm=TRUE,
aggregation_column="ext_gene", gene_mode=TRUE,
normalize=TRUE, transform_fun_tpm = function(x) log2(x+0.1)) 

sleuth_matrix_genelevel <- sleuth_to_matrix(so, 'obs_norm', 'tpm')

write.table(sleuth_matrix_genelevel, "RUN1/abundance_genelevel_TPMtrans.txt", row.names = T, sep = "\t", quote = F, append = F)

S2C data:

S2   Post
S3   Pre
S1   Post
S7   Pre
S10   Pre
S4    Post

My questions: 1) In sleuth_prep, even if I remove the argument transform_fun_tpm = function(x) log2(x+0.1) or replace it with natural log, I get exact same results. Am I missing something here? I would like to simply get log2(TPM)

2) I'm not doing differential expression analyses but only looking at fold changes between pre and post-treatment (paired) samples for 3 different patients. So my s2c file looks like the above but I'm not using any model in sleuth_prep. Is this acceptable? (I tried to google for sleuth_prep without a model specification but I could not find any examples.)

Many thanks, any insights would be super useful.

Shweta

ShwetaCh commented 2 years ago

@pimentel @warrenmcg @lynnyi The above question is probably naive, but could you please provide any insights? I do want to make sure that I use the sleuth_prep function appropriately for between sample normalization accounting for the condition as well as any batch effects. Thank you very much in advance! Shweta