Closed seongwoohan closed 1 year ago
Hi Seong,
Judging from the screenshot it looks like it ran. Can you share what the se object looks like? That should be the read class file.
Kind Regards, Andre Sim
Hi Andre,
You are right. Let me provide the output I got from the following code.
test.bam <- system.file("extdata", "ENCFF563QZR.bam", package = "bambu")
fa.file <- system.file("extdata", "hg38.fa", package = "bambu")
gtf.file <- system.file("extdata", "gencode.v42.annotation.gtf", package = "bambu")
bambuAnnotations <- prepareAnnotations(gtf.file)
se <- bambu(reads = test.bam, annotations = bambuAnnotations, genome = fa.file, discovery = FALSE, quant = FALSE, verbose=TRUE)
se [[1]] class: RangedSummarizedExperiment dim: 287609 1 metadata(1): warnings assays(1): counts rownames(287609): rc.1 rc.2 ... rcunsplicedNew.9998 rcunsplicedNew.9999 rowData names(23): chr.rc strand.rc ... txScore.noFit txScore colnames(1): ENCFF563QZR colData names(1): name
If I do rowData(se[[1]]), I get the information as I want!
However, I am having a trouble saving this document to the directory. Could you help me to save this document as any file format such as tsv or csv, so I can work with python pandas?
Another one, if possible, I would like to extract information from constructedAnnotations = se[assays(se)$fullLengthCounts > 0], which is the gtf file that only bambu makes. Is it possible to extract the read numbers per junction file just for the gtf that bambu makes? I highlighted on the above screenshot.
Thanks a lot for helping me all the time :)
Best, Seong
Hi Seong,
To output the read class file table you can simply just convert it to a matrix and use the R native write.table() function
write.table(as.matrix(rowData(se[[1]])), file = "test.tsv", sep = "\t")
The reason you can't extract the full length counts is you have an incomplete se since you didn't run quant and discovery. Note that under assays fullLengthCounts isn't there. However in the rowData(se) table there is a readCount column. This represents the full-length read counts for each read class.
By the way, the reason your saveRDS lines are coming up with an error, is that you should change the "path" argument to "file". An rds will not be easily readable in pandas however so it won't serve your purpose.
Hope this helps.
Hello bambu developers,
I am an avid bambu user and having a hard time running discovery = FALSE, quant = FALSE on my side. I tried re-starting bambu and re-running everything from the beginning as recommended, but unable to get the outputs I want. Here are the command lines I used below and their corresponding outputs. I added the sessionInfo() output on the bottom and the commands that generated bam file from the fastq file. I have bambu 3.0.2 and R 4.2.1.