Closed lijinw closed 2 years ago
Hi @lijinw, thank you for reaching out. I am happy to hear that DTUrtle worked for you until now, and I will try my best to resolve your problem.
The initial error message QuartzBitmap_Output - unable to open file 'images_ut_transcript/Acbd5_transcripts.png'
tells me, that the DTUrtle function is not able to create the requested image. This could be due to lacking writing permission or just that the requested folder does not exist yet.
Could you ensure, that the folder "images_ut_transcript" exist?
If so, please try if this works without error:
plot_transcripts_view(dturtle = table_UT_sig,
genes = "Gm14461",
gtf = "gencode.vM25.annotation.gtf",
genome = 'mm10',
one_to_one = TRUE,
savepath = "images_ut_transcript")
Please let me know if that resolves your problem. Thanks.
Best, Tobi
P.S.: Normally, DTUrtle should create a save-folder if it is missing. I just noticed all plotting functions do this, except for plot_transcripts_view(). I will push a minor update in the following hour or so.
Hi @TobiTekath,
Thanks for checking my code. I guess the issue is that I didn't make the folder "images_ut_transcript" in advance. It works now.
Best, Lijin
Hi @lijinw,
that is great to hear.
I also released DTUrtle 1.0.2 in the last days, which fixes, among other things, that plot_transcripts_view()
did not create the missing folder by itself.
Best, Tobi
Hi @TobiTekath,
Thanks for letting me know.
Best, Lijin
Hi, I have a issue in plotting transcripts view, it works fine when I plot any single gene, but I can't plot it together. I got isoform files from rsem. And I have finished the DTU analysis, and plot the barplot and heatmap, they all works perfect. I'm not sure if is a bug, or there is something wrong with my code. I would appreciate if you can give me some suggestions.
table_UT_sig <- plot_transcripts_view(dturtle = table_UT_sig, gtf = "gencode.vM25.annotation.gtf", genome = 'mm10', one_to_one = TRUE, savepath = "images_ut_transcript", add_to_table = "transcript_view")
This the traceback traceback()
For specific gene, it works fine. plot_transcripts_view(dturtle = table_UT_sig, genes = "Gm14461", gtf = "gencode.vM25.annotation.gtf", genome = 'mm10', one_to_one = TRUE)
To Reproduce Steps to reproduce the behavior:
prepare gtf files
tx2gene <- import_gtf(gtf_file = "gencode.vM25.annotation.gtf") tx2gene$gene_name <- one_to_one_mapping(name = tx2gene$gene_name, id = tx2gene$gene_id)
> Changed 110 names.
tx2gene$transcript_name <- one_to_one_mapping(name = tx2gene$transcript_name, id = tx2gene$transcript_id) tx2gene <- move_columns_to_front(df = tx2gene, columns = c("transcript_name", "gene_name"))
import files
list.files("/Users/LiJin/Documents/nBox/Lijin/Manvendra/rsem/") files <- Sys.glob("/Users/LiJin/Documents/nBox/Lijin/Manvendra/rsem/*isoforms.results") files names(files) <- gsub("/Users/LiJin/Documents/nBox/Lijin/Manvendra/rsem/","",files) data <- import_counts(files, type = "rsem", tx2gene=tx2gene[,c("transcript_id", "gene_name")]) rownames(data) <- tx2gene$transcript_name[match(rownames(data), tx2gene$transcript_id)] dim(data) #142604 8 head(data) colnames(data) <- gsub(".isoforms.results","",colnames(data)) pd <- data.frame("id"=colnames(data), "group"=c(rep("Ctr_LPS",4), rep("Ctr_Ut",4),rep("Mut_LPS",4),rep("Mut_Ut",4)), stringsAsFactors = FALSE) pd
DTU analysis
dturtle_UT <- run_drimseq(counts = data, tx2gene = tx2gene, pd=pd, id_col = "id", cond_col = "group", cond_levels = c("Mut_Ut","Ctr_Ut"), filtering_strategy = "bulk")
Retain 28937 of 73504 features.
Removed 44567 features.
head(dturtle_UT$meta_table_gene) dturtle_UT$used_filtering_options
dturtle_UT_sig <- posthoc_and_stager(dturtle = dturtle_UT, ofdr = 0.05, posthoc = 0.1)
Found 27 significant genes with 22 significant transcripts (OFDR: 0.05)
table_UT_sig <- create_dtu_table(dturtle = dturtle_UT_sig, add_gene_metadata = list("chromosome"="seqnames"), add_tx_metadata = list("tx_expr_in_max" = c("exp_in", max))) dim(table_UT_sig$dtu_table)
table_UT_sig <- plot_proportion_barplot(dturtle = table_UT_sig, meta_gene_id = "gene_id.1", savepath = "images_ut_barplot", add_to_table = "barplot")
head(plot_UT_sig$dtu_table$barplot) head(list.files("./images/"))
table_UT_sig <- plot_proportion_pheatmap(dturtle = table_UT_sig, include_expression = TRUE, treeheight_col=20, savepath = "images_ut_heatmap", add_to_table = "pheatmap")
Please complete the following information: -R version 4.1.2 (2021-11-01) -Platform: x86_64-apple-darwin17.0 (64-bit) -Running under: macOS Catalina 10.15.7 -DTUrtle_1.0.1