GarrettLab-UF / LipidMatch

R script using rule based feature identification for lipids
Other
6 stars 10 forks source link

R 3.5 #3

Open ricoderks opened 5 years ago

ricoderks commented 5 years ago

Hi,

I made some small changes and I have it running now in R 3.5.1. I also made some changes for selecting folders. This should now work in linux and windows. Unfortunately I have no windows machine to test. If you're interested shall I send you a pull request?

Cheers, Rico

jeremykoelmel commented 5 years ago

That would be wonderful, and I appreciate the contribution. It will be helpful for people who do not want to have two version of R and who want to run on a Linux system. I have a Windows 10 computer I can test on. Send a pull request, and if you can send it to my gmail account as well, jeremykoelmel@gmail.com, as a zip file, that would be great. Any feedback on the software and what you are using it for is always appreciated. We are always expanding lipid MS/MS libraries and looking for feedback/contributors!

jeremykoelmel commented 5 years ago

Sorry it so long to commit your changes, thank you!

jeremykoelmel commented 4 years ago

Note: I reverted back to the version for 3.3.3, due to some package issues I think it is best to just stick with the older version as it does not effect performance and user can have their own version of R for LipidMatch specifically.

lipidomicR commented 3 years ago

Hi Rico, May I have your Rscript to test in my window computer? I have R4.1 and it can run it but it did not generate ID files. Thanks.

ricoderks commented 3 years ago

Hi,

I'll have a look if I can still find. That's been a while.

cheers, Rico

lipidomicR commented 3 years ago

Thank you for the quick response. It is great if you can find it. Appreciated! Chihyu On Wed, Sep 29, 2021 at 9:33 AM Rico Derks @.***> wrote:

Hi,

I'll have a look if I can still find. That's been a while.

cheers, Rico

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/GarrettLab-UF/LipidMatch/issues/3#issuecomment-930180336, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVVIO6XRBK3FOUD2LWS5HVDUEMISXANCNFSM4GJNJBLA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

ricoderks commented 3 years ago

Ok, that was maybe a bit easier than I thought. I think this is the one you need: https://github.com/ricoderks/LipidMatch/blob/master/LipidMatch.r

Often paste() was used to create paths, I changed this to file.path().

Cheers, Rico

lipidomicR commented 3 years ago

Thank you and I will try to see if it runs well in window computer. Thank you so much. Chihyu

On Wed, Sep 29, 2021 at 9:43 AM Rico Derks @.***> wrote:

Ok, that was maybe a bit easier than I thought. I think this is the one you need: https://github.com/ricoderks/LipidMatch/blob/master/LipidMatch.r

Often paste() was used to create paths, I changed this to file.path().

Cheers, Rico

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/GarrettLab-UF/LipidMatch/issues/3#issuecomment-930189175, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVVIO6XNSJYLRXNOYBWBQEDUEMJYZANCNFSM4GJNJBLA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

lipidomicR commented 3 years ago

Hi Rico, Just want to keep you an update. Unfortunately, the R script does not work in R 4.1 on Window system. Thank you.

ricoderks commented 3 years ago

Ok, that's too bad. Do you get any errors?

lipidomicR commented 3 years ago

I got several error messages Error in lengthFoldersToRun : object 'lengthFoldersToRun' not found Error in paste("ERROR: Remove your 'Output' folder from the current Input Directory: ", : object 'InputDirectory' not found Error: object 'ErrorOutput' not found

ricoderks commented 2 years ago

Can you tell me what your settings for csvInput and ManuallyInputVariables are?

lipidomicR commented 2 years ago

These are my setting: }else if(csvInput == TRUE){ ####################### Get input from csv VARIABLES SECTION ###############################

parametersDirectory

parametersDir <- "C:/Program Files (x86)/LipidMatch_Flow_3.5/LipidMatch_Flow_3.5/LipidMatch_Modular/CSV_Parameters/" parametersFile <- paste(parametersDir, "LIPIDMATCH_PARAMETERS_Thermo_QExactive t.csv", sep="") parametersInput_csv <- read.csv(parametersFile, sep=",", na.strings="NA", dec=".", strip.white=TRUE,header=FALSE) parametersInput_csv <- as.matrix(parametersInput_csv) ErrorOutput<-0

Retention Time plus or minus

RT_Window <- as.numeric(parametersInput_csv[2,2]) #window of .2 => +/- .1

parts-per-million window for matching the m/z of fragments obtained in

the library to those in experimentally obtained ppm_Window <- as.numeric(parametersInput_csv[4,2]) #window of 10 => +/- 5 ppm error

Tolerance for mass-to-charge matching at ms1 level (Window)

PrecursorMassAccuracy <- as.numeric(parametersInput_csv[3,2])

Plus minus range for the mass given after targeting parent ions

portrayed in excalibur to match exact mass of Lipid in library SelectionAccuracy <- as.numeric(parametersInput_csv[5,2])

Threshold for determining that the average signal intensity for a given

MS/MS ion should be used for confirmation intensityCutOff <- as.numeric(parametersInput_csv[7,2])

Feature Table information

CommentColumn <- as.numeric(parametersInput_csv[10,2]) MZColumn <- as.numeric(parametersInput_csv[11,2]) RTColumn <- as.numeric(parametersInput_csv[12,2]) RowStartForFeatureTableData <- as.numeric(parametersInput_csv[13,2])

Look at your Feature Table (.csv)...What row do you first see numbers?

if (ManuallyInputVariables==TRUE){

Retention Time plus or minus

RT_Window <- .2 #window of .2 => +/- .1

parts-per-million window for matching the m/z of fragments obtained in

the library to those in experimentally obtained ppm_Window <- 10 #window of 10 => +/- 5 ppm error

Tolerance for mass-to-charge matching at ms1 level (Window)

PrecursorMassAccuracy<-0.005

Plus minus range for the mass given after targeting parent ions

portrayed in excalibur to match exact mass of Lipid in library SelectionAccuracy<-0.4

Threshold for determining that the average signal intensity for a given

MS/MS ion should be used for confirmation intensityCutOff<-1000

Feature Table information

CommentColumn <- 1 MZColumn <- 2 RTColumn <- 3 RowStartForFeatureTableData <- 2 #Look at your Feature Table (.csv)...What row do you first see numbers?

On Thu, Sep 30, 2021 at 3:03 AM Rico Derks @.***> wrote:

Can you tell me what your settings for csvInput and ManuallyInputVariables are?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/GarrettLab-UF/LipidMatch/issues/3#issuecomment-930887144, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVVIO6XRKXZ2PG6Z24ZCIH3UEQDSHANCNFSM4GJNJBLA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

lipidomicR commented 2 years ago

have you seen this message before?

Error in s_index:length(ms2) : NA/NaN argument

I ran lipidMatch script but kept seeing this error message. I am wondering that do you have any solution for this?

Thank you.

On Thu, Sep 30, 2021 at 1:52 PM Chihyu Chen @.***> wrote:

These are my setting: }else if(csvInput == TRUE){ ####################### Get input from csv VARIABLES SECTION ###############################

parametersDirectory

parametersDir <- "C:/Program Files (x86)/LipidMatch_Flow_3.5/LipidMatch_Flow_3.5/LipidMatch_Modular/CSV_Parameters/" parametersFile <- paste(parametersDir, "LIPIDMATCH_PARAMETERS_Thermo_QExactive t.csv", sep="") parametersInput_csv <- read.csv(parametersFile, sep=",", na.strings="NA", dec=".", strip.white=TRUE,header=FALSE) parametersInput_csv <- as.matrix(parametersInput_csv) ErrorOutput<-0

Retention Time plus or minus

RT_Window <- as.numeric(parametersInput_csv[2,2]) #window of .2 => +/- .1

parts-per-million window for matching the m/z of fragments obtained in

the library to those in experimentally obtained ppm_Window <- as.numeric(parametersInput_csv[4,2]) #window of 10 => +/- 5 ppm error

Tolerance for mass-to-charge matching at ms1 level (Window)

PrecursorMassAccuracy <- as.numeric(parametersInput_csv[3,2])

Plus minus range for the mass given after targeting parent ions

portrayed in excalibur to match exact mass of Lipid in library SelectionAccuracy <- as.numeric(parametersInput_csv[5,2])

Threshold for determining that the average signal intensity for a given

MS/MS ion should be used for confirmation intensityCutOff <- as.numeric(parametersInput_csv[7,2])

Feature Table information

CommentColumn <- as.numeric(parametersInput_csv[10,2]) MZColumn <- as.numeric(parametersInput_csv[11,2]) RTColumn <- as.numeric(parametersInput_csv[12,2]) RowStartForFeatureTableData <- as.numeric(parametersInput_csv[13,2])

Look at your Feature Table (.csv)...What row do you first see numbers?

if (ManuallyInputVariables==TRUE){

Retention Time plus or minus

RT_Window <- .2 #window of .2 => +/- .1

parts-per-million window for matching the m/z of fragments obtained in

the library to those in experimentally obtained ppm_Window <- 10 #window of 10 => +/- 5 ppm error

Tolerance for mass-to-charge matching at ms1 level (Window)

PrecursorMassAccuracy<-0.005

Plus minus range for the mass given after targeting parent ions

portrayed in excalibur to match exact mass of Lipid in library SelectionAccuracy<-0.4

Threshold for determining that the average signal intensity for a given

MS/MS ion should be used for confirmation intensityCutOff<-1000

Feature Table information

CommentColumn <- 1 MZColumn <- 2 RTColumn <- 3 RowStartForFeatureTableData <- 2 #Look at your Feature Table (.csv)...What row do you first see numbers?

On Thu, Sep 30, 2021 at 3:03 AM Rico Derks @.***> wrote:

Can you tell me what your settings for csvInput and ManuallyInputVariables are?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/GarrettLab-UF/LipidMatch/issues/3#issuecomment-930887144, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVVIO6XRKXZ2PG6Z24ZCIH3UEQDSHANCNFSM4GJNJBLA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

ricoderks commented 2 years ago

Assuming you have csvInput set to TRUE or ManuallyInputVariables set to TRUE. If you run the code until line 320 (it should say #### END VARIABLE DECLARATIONS SECTION ####).

Please check your variables that the contain the correct folder names.