tbaccata / amica

amica: an interactive and user-friendly web-based platform for the analysis of proteomics data
GNU General Public License v3.0
23 stars 8 forks source link

Warning: Error in [[: attempt to select less than one element in get1index 1: runApp #15

Closed lananh-ngn closed 2 years ago

lananh-ngn commented 2 years ago

Hello, Thank you for developing this tool. I am using FragPipe output. I used to be able to use it but now I am stuck on a faded grey page after clicking on Analyze both on the web version and the R version. On the R version, in the terminal, this error is displayed Warning: Error in [[: attempt to select less than one element in get1index 1: runApp Could you help please ? Thank you in advance for your help.

Input file firsttwolines.txt Contrast file contrast.txt Design file design.txt

tbaccata commented 2 years ago

Hello!

Thanks for sending example files, I could reproduce the error.

The issue are the sample names, they start with a number and contain special characters ("-" the hyphen). R's read command(s) checks the column names whether they are in a correct format, and finally coerces column names to syntactically valid names.

There should have been some error messages, and definitely some checks in the software. I will have a deeper look into this, this should be reported back to the user.

Does it work when you use this exp. design? ( here I've appended an X in front of all samples, and removed special characters "-" with a dot ".") expDesign.txt

Best, Sebastian

lananh-ngn commented 2 years ago

Sebastian, Thank you for the quick answer. I tried to run the tool with file you provided in your message and with the names changed in the fragpipe input file. However, I still have the same error. Thank you in advance, Lan Anh

tbaccata commented 2 years ago

I will have a look at this, I hope I can solve this until tomorrow. I'll get back to you.

This error only affects FragPipe input.

lananh-ngn commented 2 years ago

Thank you for your quick feedback. Also, I had to change the headers so that it fits amica's requirements but I think FragPipe changed the output in their recent upgrade: https://github.com/Nesvilab/FragPipe/issues/774. The file now has Intensity and MaxLFQ Intensity. Best regards, Lan Anh

tbaccata commented 2 years ago

Hello Lan Anh,

please try again, it should work now on the server, and the same code is also already on github. You can use your original exp. design, amica automatically handles special characters now.

You did get an error message, that Total Intensity and Unique Intensity columns were missing, that's why you renamed them, is this correct? The underlying issue in amica's code was, that some LFQ intensity columns were expected (either suffixed per sample with Intensity, RazorIntensity, or MaxLFQ Intensity in the combined_proteins.tsv file) in the analysis - that's what caused the error.

Relevant columns from FragPipe's output didn't change in their update, only a couple of Intensity columns have been removed. That's why amica complained about missing intensity columns. Otherwise the same columns are present, that are parsed by amica.

I've fixed this behavior, FragPipe v18 output is now automatically handled by amica. So you don't need to rename the columns your original file (although it should also work with the input file you've uploaded here).

Please let me know, whether everything works for you.

Best, Sebastian

lananh-ngn commented 2 years ago

Sebastian, Thank you for the quick solve. I tried it with the source code and it works fine. Thank you also for the clear explanation! Best regards, Lan Anh