fbreitwieser / pavian

🌈 Interactive analysis of metagenomics data
https://doi.org/10.1093/bioinformatics/btz715
367 stars 70 forks source link

Pavian crashes when uploading 64 Kraken2 reports #73

Open christophevandijck opened 3 years ago

christophevandijck commented 3 years ago

Hello, I have a data set consisting of 64 Kraken2 .report files and 1 sample_data.csv file. Each file can be uploaded successfully in its individual form, but when I try to upload all files at the same time in Pavian via R, the application closes itself leaving the following message:

Listening on http://127.0.0.1:5000 [mrt29 14:08] Started new shiny session #1 (1 session(s) running) [mrt29 14:08] Reading files in C:/Users/CVANDI~1/AppData/Local/Temp/RtmpIhDy05/e5cbe50d613db292c70a802c Warning: Error in [[: subscript out of bounds [No stack trace available] [mrt29 14:08] Exiting session #1

When I try to upload all files in the Browser version of Pavian, I receive the message that the connection is lost.

Can anyone help me solve this issue?

Many thanks!

fbreitwieser commented 3 years ago

Hi @christophevandijck , can you provide the files to test them?

christophevandijck commented 3 years ago

Dear @fbreitwieser, thank you for your reply. Can I share the files with you privately?

fbreitwieser commented 3 years ago

Hi @christophevandijck , yep for sure, you can send them to florian.bw@gmail.com . Feel free to scramble the taxid and name columns if required (though in the same way in each file ..). Probably only sending the first X lines of each file works, too, but you'd have to verify that it still causes a problem.

NailouZhang commented 3 years ago

hi @fbreitwieser , pavian is not work well with my Kraken2 .report files as well as the pavian's example-data/PT8-DNA-S1.report.. showed in below.

Added sample sets example-data/brain-biopsies and example-data/hmp with 23 valid reports in total. The following files did not conform the report format:

I check the Kraken2 .report that passed to pavian and not, the passed Kraken2 .report have seven columns and columns' names while the failed Kraken2 .reports have no columns' names and depth column. How can I resolve these. What's more, I can't pass the test Comparison Part of pavian.

Can you help me solve this issue?

Many thanks!

NailouZhang commented 3 years ago

aaaa<-read.table("kraken-report.txt",header = F,sep = "\t")

colnames(aaaa)<-c("perc","n-clade","n-stay","rank","taxonid","name")

library(dplyr)

aaaa<-mutate(aaaa, depth=nchar(name)-nchar(trimws(name, "left")))

aaaa<-aaaa[,c("perc","n-clade","n-stay","rank","taxonid","depth","name")]

write.table(aaaa, file = "kraken-report2.txt",quote = F,sep = "\t",row.names = F,col.names = T)

This script may help, but Pavian seems can read files with size bigger than 1M.

fbreitwieser commented 3 years ago

Hi @NailouZhang , can you try again with the latest version v1.2.0? Thanks