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

Extracting Header Information #83

Open
Me9atron opened this issue Feb 26, 2024 · 5 comments
Open

Extracting Header Information #83

Me9atron opened this issue Feb 26, 2024 · 5 comments
Assignees
Labels

Comments

@Me9atron
Copy link

Hello,

When I tried Extracting Header Information with the following code in R,

runScanHeadsman(
path="D:\Raw_data\top down\20240212_myoglobin_480k_mz400-6000",
executable="D:\Raw_data\top down\ScanHeadsman-1.3.20220905\ScanHeadsman.exe"
)

I always meet the error "First argument should be valid file or folder name; --noMS received", and have not seen any generated .txt (scan header table) and a .csv (method table) file for each .raw file.

My raw files (Thermo Orbitrap) were acquired in direct infusion with only MS2 spectral, and are in the folder of "D:\Raw_data\top down\20240212_myoglobin_480k_mz400-6000", and ScanHeadsman.exe is in the "D:\Raw_data\top down\ScanHeadsman-1.3.20220905. I also tried specifying a single raw file using "path="D:\Raw_data\top down\20240212_myoglobin_480k_mz400-6000\data 1.raw", but I got the same error as above-mentioned.

Could you help me figure it out? Thank you.

Best wishes,

Zhaowei

@sgibb
Copy link
Owner

sgibb commented Feb 26, 2024

Does adding normalizePath and \\ help?

runScanHeadsman(
    path=normalizePath("D:\\Raw_data\\top down\\20240212_myoglobin_480k_mz400-6000"),
    executable="D:\\Raw_data\\top down\\ScanHeadsman-1.3.20220905\ScanHeadsman.exe"
)

BTW: the directory separator \ has to be escaped on windows (by a double slash): \\

@sgibb sgibb self-assigned this Feb 26, 2024
@sgibb sgibb added the question label Feb 26, 2024
@Me9atron
Copy link
Author

Me9atron commented Feb 26, 2024

Thank you, I tried adding normalizePath and \ but still got the same error as below (the double slash became single slash after I sent my message).

runScanHeadsman(

  • path=normalizePath("D:\Raw_data\top down\20240212_myoglobin_480k_mz400-6000"),
  • executable="D:\Raw_data\top down\ScanHeadsman-1.3.20220905\ScanHeadsman.exe"
  • )
    First argument should be valid file or folder name; --noMS received

I also tried running ScanHeadsman from the commandline (ScanHeadsman.exe --noMS --methods:CSV) in "Command prompt", but it seemed the command was not recognized as an internal or external command, operable program or batch file.

C:\Users\mzw91>ScanHeadsman.exe --noMS --methods:CSV
'ScanHeadsman.exe' is not recognized as an internal or external command, operable program or batch file.

C:\Users\mzw91>D:\Raw_data\top down\ScanHeadsman-1.3.20220905\ScanHeadsman.exe --noMS --methods:CSV
'D:\Raw_data\top' is not recognized as an internal or external command, operable program or batch file.

Could you help me try something more for fixing this strange issue? Thank you.

Best wishes,

Zhaowei

@sgibb
Copy link
Owner

sgibb commented Feb 26, 2024

I am not familiar with Windows. Could you rename your "top down" directory into "topdown" (or "top_down") to remove the spaces in the filename? At least in

C:\Users\mzw91>D:\Raw_data\top down\ScanHeadsman-1.3.20220905\ScanHeadsman.exe --noMS --methods:CSV
'D:\Raw_data\top' is not recognized as an internal or external command, operable program or batch file.

there seems to be a problem with the space.

@Me9atron
Copy link
Author

Me9atron commented Feb 26, 2024

Awesome! Now it works, the method file and head file were both generated with the following command. Thanks!

C:\Users\mzw91>D:\Raw_data\topdown\ScanHeadsman-1.3.20220905\ScanHeadsman.exe D:\Raw_data\topdown\20240212_myoglobin_480k_mz400-6000 --methods:CSV
The input argument is a folder
Looking for raw files in it
Using default extension for result
Processing of D:\Raw_data\topdown\20240212_myoglobin_480k_mz400-6000\20240212_myoglobin_OT_480k.raw
Extracting method to D:\Raw_data\topdown\20240212_myoglobin_480k_mz400-6000\20240212_myoglobin_OT_480k.methods.txt
Scan processing done; Total: 100 scans
Writing to CSV file.
Done
1 files processed

I noticed the methods.txt file is empty, I guess it should be because the data was acquired by direct infusion without using an instrument method. Then I put csv. file, mzML file, fasta file and this empty methods.txt file in the same folder "D:\Raw_data\topdown\20240212_myoglobin_480k_mz400-6000", and ran the following script. There was an error saying
"Could not find any csv files!" as below, but I checked the csv. file (scan heads) has correct format "csv" and with normal scan header information, could it be the empty methods.file affecting producing the TopDownSet object and triggering that error?
I attached the csv. file and methods.txt file for your reference. Thanks.

the mass adduct for a proton

H <- 1.0078250321

myoglobin <- readTopDownFiles(

  • directory path

  • path=normalizePath("D:\Raw_data\topdown\20240212_myoglobin_480k_mz400-6000"),
  • fragmentation types

  • type = c("a", "b", "c", "x", "y", "z"),
  • adducts (add -H/H to c/z and name

  • them cmH/zpH (c minus H, z plus H)

  • adducts = data.frame(
  • mass=c(-H, H),
    
  • to=c("c", "z"),
    
  • name=c("cmH", "zpH")),
    
  • initiator methionine removal

  • modifications = "Met-loss",
  • don't use neutral loss

  • neutralLoss = NULL,
  • tolerance for fragment matching

  • tolerance = 1e-3,
  • topdownrdata was generate with an older version of topdownr,

  • the method files were generated with FilterString identification,

  • use conditions = "ScanDescription" (default) for recent data.

  • conditions = "FilterString"
  • )
    Error in .listTopDownFiles(path, pattern = pattern) :
    Could not find any csv files!

20240212_myoglobin_OT_480k.csv
20240212_myoglobin_OT_480k.methods.txt

@sgibb
Copy link
Owner

sgibb commented Mar 5, 2024

Sorry for the late reply. The csv has to be named 20240212_myoglobin_OT_480k_experiments.csv. The code is looking for experiments.csv at the end of the filename.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants