Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with importing salmon files #69

Closed
Mekilich opened this issue Jan 22, 2022 · 16 comments
Closed

Issue with importing salmon files #69

Mekilich opened this issue Jan 22, 2022 · 16 comments
Assignees
Labels
bug RATs not behaving the way it is intended to. feature request Suggestions for extended functionality.
Milestone

Comments

@Mekilich
Copy link

Hi,
I want to carry out some analysis with your package, but i have a problem importing salmon files. fish4rodents successfully converts the files to H5 format but then gives the below error.

mydata <- fish4rodents(A_paths= samples_A, B_paths= samples_B,
annot= myannot, scaleto=100000000)

Error in lgth$A : $ operator is invalid for atomic vectors

How do i solve this? what could be the reason?

@fruce-ki
Copy link
Collaborator

fruce-ki commented Jan 23, 2022 via email

@Mekilich
Copy link
Author

Hi, Thanks for answering.
i have 3 replicates per condition. quant.sf files are 2 mb while H5 files are 500kb. so i guess the conversion was successful. i havent tried with Kallisto, but i will, and will let you know if that works. i used same salmon files for isoformswitchanalyzer package and they worked fine there.

@fruce-ki
Copy link
Collaborator

fruce-ki commented Jan 23, 2022 via email

@Mekilich
Copy link
Author

Hi, i have the kallisto outputs now. but fish4rodets doesnt work with them since they have no quant.sf files. and i didnt see any other code for importing kallisto files in vignette. am i missing something? and i installed RATs yesterday, so its the latest version.
btw when i run this code below i get a dataframe with one column containing transcript ids.

ids <- as.data.frame( h5read("col-0_LH_1/abundance.h5", "/aux/ids") )

@fruce-ki
Copy link
Collaborator

fruce-ki commented Jan 23, 2022 via email

@Mekilich
Copy link
Author

Yeah so i think there is no problem with h5 files. since that code works. it looks like fish4rodents is looking for quant.sf file in kallisto output. but kallisto doesnt produce such an output. it produces 3 files h5, tsv and json. with salmon, fish4rodents finds the quant.sf files and converts them to h5 but then it gives the error "Error in lgth$A : $ operator is invalid for atomic vectors". kallisto 0.44 outputs same files as newest kallisto but content might be a bit different. fish4rodents gives below error. and deletes the abundance.h5 file from kallisto output.

Error in fread(file.path(fish_dir, "quant.sf")) :
File 'col-0_LH_1/quant.sf' does not exist or is non-readable. getwd()=='D:/Transcriptomics/Kallisto'

@Mekilich
Copy link
Author

I just tried with kallisto 0.44 output. same error as before.

@fruce-ki
Copy link
Collaborator

fruce-ki commented Feb 3, 2022

Just an update that I have not forgotten about this. Setting up to work with Kallisto for the first time in years was a bumpy road full of annotation problems. But I am getting there and should be able to deal with the actual issue here soon.

@Mekilich
Copy link
Author

Mekilich commented Feb 5, 2022

Thanks for not forgetting. waiting to see if you will have the same issue.

@fruce-ki
Copy link
Collaborator

fruce-ki commented Feb 8, 2022

Right, there is definitely a syntax bug in fish4rodents() that escaped the unit tests.

fruce-ki pushed a commit that referenced this issue Feb 8, 2022
@fruce-ki
Copy link
Collaborator

fruce-ki commented Feb 8, 2022

Ok, I've pushed a syntax fix to the development branch. I suggest you install from there for now, as I need to do some cleanup before making a release.

Please note that I have already disabled wasabi, which is the third-party package that provides conversion from Salmon to Kallisto. Presumably it worked for you, but I got really obscure weird errors out of it just now and it hasn't been available for auto-install for my versions of R in years, so it is negatively impacting the import function. It is a single-line conversion command that users of Salmon and RATs should be able to execute on their own.
So don't delete the .h5 files you already got!

@Mekilich
Copy link
Author

Mekilich commented Feb 9, 2022

Hi,
i installed RATS from development branch but now i get the following error when i run fish4rodents.

Error in rhdf5::h5read(file.path(fil, "abundance.h5"), "/bootstrap") :
Object '/bootstrap' does not exist in this HDF5 file.

@fruce-ki
Copy link
Collaborator

fruce-ki commented Feb 9, 2022 via email

@Mekilich
Copy link
Author

i have run kallisto wih bootstraps allowed and now it worked so all looks fine for now. Thanks for all the help.

@fruce-ki
Copy link
Collaborator

Good to know that this works! Thank you for your time and understanding in working through this.

@fruce-ki
Copy link
Collaborator

fruce-ki commented Jun 1, 2022

As of commit e27c739 , it is now possible to import non-bootstrapped estimates from the Kallisto format.

Currently still in the development branch.

@fruce-ki fruce-ki self-assigned this Jun 1, 2022
@fruce-ki fruce-ki added bug RATs not behaving the way it is intended to. feature request Suggestions for extended functionality. labels Jun 1, 2022
@fruce-ki fruce-ki added this to the 0.6.7 milestone Jun 1, 2022
@fruce-ki fruce-ki closed this as completed Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug RATs not behaving the way it is intended to. feature request Suggestions for extended functionality.
Projects
None yet
Development

No branches or pull requests

2 participants