idrblab / NOREVA

R Package for Systematic Optimization of Metabolomic Data Processing
https://idrblab.org/noreva/
GNU General Public License v3.0
17 stars 5 forks source link

Cannot run the normulticlassqcall function #1

Closed nilaycan closed 2 years ago

nilaycan commented 2 years ago

Hi!

Thanks for this cool package but I'm facing issues while testing my own data.

I read my data frame with this command: multi_qcs_data <- PrepareInuputFiles(dataformat = 1, rawdata = "my_dat.csv")

Then I run this command:

normulticlassqcall(fileName = multi_qcs_data, SAalpha="Y", SAbeta="Y", SAgamma="Y")

I got this output and nothing else:

NOREVA is Running ...


Depending on the size of your input dataset Several mintues or hours may be needed for this assessment


STEP 1: Prepare input file in standard formats of NOREVA

STEP 2: The assumption(s) held as indicated by users Study Assumption alpha: all proteins were equally important (Y/N): Y Study Assumption beta: the level of protein abundance was constant among all samples (Y/N): Y Study Assumption gamma: the intensity of the majority of proteins were unchanged (Y/N): Y

STEP 3: The criteira selected by users for this assessment Criterion Ca: Reduction of Intragroup Variation Criterion Cb: Differential Metabolic Analysis Criterion Cc: Consistency in Marker Discovery Criterion Cd: Classification Accuracy

NOREVA is Running ...

Then I re-run the command with normulticlassqcall function and got nothing, it prints nothing to the screen.

My values were float but I converted them to integers so this could not be an issue. I also tried to read the scripts manually you shared on GitHub, deinstall the package and try to run my command like this but it didn't work either. I was also able to analyze my data with your online tool btw.

I'm attaching toy data (toy_data.csv) so you can test it. I'll appreciate it if you can help me with this issue, thanks in advance!

Best regards,

sample batch class order Compound1 Compound2 Compound3 Compound4 Compound5 Compound6 Compound7 Compound8 Compound9 Compound10 Compound11 Compound12 Compound13 Compound14 Compound15 Compound16 Compound17 Compound18 Compound19 Compound20 Compound21 Compound22
QC_A1 1 NA 1 471.3258 121.9894 53.6893 46.0127 19.6326 55.6299 390.642 230.4999 268.6231 98.0682 76.4185 136.0714 250.8112 29.7602 84.3242 93.0165 163.2144 188.8062 196.6569 81.2978 62.016 233.8384
P002 1 P 2 447.5214 112.0167 63.6418 32.3919 18.7128 67.2068 429.8259 92.5358 186.7217 128.2263 82.1869 135.1277 223.0173 34.2573 44.555 93.2033 155.622 133.4072 246.5751 77.5042 59.6866 247.2712
P030 1 P 3 367.4264 130.3025 49.7178 35.0531 19.2009 45.6502 374.831 114.1434 196.4719 86.3862 85.0711 139.3744 253.0738 32.5945 49.911 90.0422 129.4411 131.7057 161.4439 80.223 59.437 234.431
P046 1 P 4 539.2744 146.7002 43.9377 43.2816 16.845 71.9005 406.6822 152.2744 249.7078 84.2155 59.1135 100.5523 168.8219 20.8909 25.5816 69.9227 138.9186 141.3955 176.3392 72.3829 37.2374 174.5279
P018 1 P 5 337.4608 108.9412 55.2683 36.7921 26.672 77.6664 412.8691 115.4144 171.2514 83.0315 85.039 125.8085 205.6706 23.4152 65.7325 91.7084 131.0643 123.2271 211.4709 81.2346 55.0414 232.6532
P053 1 P 6 468.8054 123.177 62.4935 39.535 14.8646 59.4689 408.7445 127.3159 207.5871 87.2939 102.344 155.0636 214.9166 26.5475 37.7955 99.2143 169.1313 136.7524 167.1984 76.872 61.711 260.5065
P076 1 P 7 372.4673 131.688 50.1006 38.1927 16.5634 58.5391 351.6873 111.0236 170.0814 70.6391 58.9533 93.6396 178.2213 25.553 44.3211 79.2972 119.8589 127.9855 190.4377 66.1868 52.2405 169.5383
P011 1 P 8 362.9455 105.485 47.7082 41.4258 14.9772 69.4637 336.5637 116.9165 182.1716 77.822 57.0626 98.4054 155.88 20.7863 33.4615 75.7623 112.1617 121.1508 134.2208 66.3765 45.4045 174.8203
YingZhang0811 commented 2 years ago

@nilaycan Hi. Thanks for your issue :)

Thanks for using NOREVA.

The R object 'tform' is first generated in the parallel computing for obtaining object 'k.l'. When the program runs here: foreach(j = tform) %do% {...}, it cannot find the object 'tform'. I found there were two possible reasons for this error. However, since your test data didn’t show the full picture of the original data, I cannot judge which reason is the case. So, I have listed these two reasons below for your subsequent debugging.

The key line is afterqc_table <- shiftCor(samPeno, samFile, Frule = 0.8, QCspan = 0, degree = degree). First, the statTarget::shiftCor function requires the data that its first and last rows must both be QC samples. In this case, your sample data does not meet this requirement.

At this point, I thought the problem would be solved. Then, I found that the object 'afterqc_table' is a matrix with all infinite values. To solve this, you may try yourself with the original data and then adjust the parameter 'QCspan'.

I wonder if you have any suggestions? @JianboFu0406