Copy & Pasting into Rule Set Editor

support
Copy & Pasting into Rule Set Editor mcminn m  2024-07-25 10:49
 

Hello,

I am trying to copy and paste rules into the rule set editor in the document settings for result files. I have a number of different conditions, and right now I cannot paste in or import a table to set up my result file name rules. Happy to discuss more if needed, thank you so much!

 
 
Nick Shulman responded:  2024-07-25 11:45
Can you send us your Skyline document and what you were trying to paste into the Rule Set Editor?

In Skyline you can use the menu item:
File > Share
to create a .zip file containing your Skyline document and supporting files including extracted chromatograms.

Files which are less than 50MB can be attached to these support requests. You can always upload larger files here:
https://skyline.ms/files.url
Make sure you also send us the text file that you are trying to paste into the Rule Set Editor.

We have not tested pasting into the Rule Set Editor very much because the purpose of the Rule Set Editor is to prevent you having to paste into the Document Grid.
-- Nick
 
mcminn m responded:  2024-07-25 12:00
Hi Nick,

Thanks much, I was trying to just paste into either the Pattern or Replacement column using the attached excel sheet. I also tried to paste the entire row at once, but that didn't work either. It would also be great to have a "fill down" option for the Source and Target columns like in the document grid.

This function definitely saves me a lot of time - but could be really fast if I could paste directly into it.

I did have to upload the files to the online file sharing, the file name is: 2024_07_25_McMinn_Skyline.zip

Thank you so much!

Best,

Madison
 
Nick Shulman responded:  2024-07-25 12:49
What were you hoping that your set of rules would look like?
It looks like you might be intending to list all of the replicate names and all of the substitutions.
If that's what you are going for, it would probably make more sense just to paste the values that you want into the Document Grid.

If you tell us what you want the results to look like, there might be a way to accomplish the same thing using the power of regular expressions and a smaller number of rows in the Rule Set.
-- Nick
 
mcminn m responded:  2024-07-25 13:04
Hi Nick,

I suppose I was hoping to have the rule set eventually look the same as it does in my current Skyline file, just with the support to copy and paste into it. I find this approach is a lot faster than actually copying and pasting in the document grid since I have 4 replicate files that need to be matched by the same pattern.

Files:
1. TN_E_AbR_B_s1_inj1
2. TN_E_AbR_B_s1_inj2
3. TN_E_AbR_B_s2_inj1
4. TN_E_AbR_B_s1_inj2

Which all follow the same rule set:
Pattern: TN_E_AbR_B -> Replacement: TN_E_AbR_B

So I'm actually trying to combine 4 replicates into 1 condition, I just happen to have a lot of conditions. I suppose it could be accomplished using the document grid, but I thought perhaps the rule set was a better approach.

I've been using the rules for a smaller number of conditions and still think that copy/pasting functionality and fill down for columns would be useful, just since these features also exist in the document grid.

Let me know if that helps to clarify.

Best,
Madison
 
Nick Shulman responded:  2024-07-25 13:58
It sounds like you'd like to set the "Condition" annotation to everything after the date at the beginning of the filename and before the "s#_inj#" at the end.

Some of your replicate names have a "_s#" and some do not, so I would probably accomplish this with two different rules.
One rule would match:
[0-9][0-9][0-9][0-9]_[0-9][0-9]_[0-9][0-9]_+(.+)_s[0-9]_inj[0-9]
and replace it with:
$1
and the other rule would match:
[0-9][0-9][0-9][0-9]_[0-9][0-9]_[0-9][0-9]_+(.+)_inj[0-9]
and also replace it with:
$1

Here's what that first regular expression does:
[0-9][0-9][0-9][0-9]_[0-9][0-9]_[0-9][0-9]_+(.+)_s[0-9]_inj[0-9]

The "[0-9][0-9][0-9][0-9]_[0-9][0-9]_[0-9][0-9]_" matches 4 digits followed by an underscore, 2 digits, another underscore, 2 digits, and another underscore.

The "(.+)" matches one or more occurrences of any character.
The "s_[0-9]_inj[0-9]" matches the stuff at the end of the filename.

These rules make the "Condition" annotation get the correct values in the Rule Set Editor.
The condition values do not actually get updated in the document because "Condition" is a Value List, and the list of values do not quite match what the rule is producing.
You should edit the Annotation definition and probably change it to "Text".

By the way, here's a page with more information about Result File Rules:
https://skyline.ms/wiki/home/software/Skyline/page.view?name=ResultFileRules
-- Nick