Connecting file name information to list annotation

support
Connecting file name information to list annotation edoud  2025-04-22 17:54
 

I've now successfully used a list with associated datasets in an application - but now I'm wondering if I can connect information from the file names to this list.

I know that we can use a regular expression to define a result file rule pulling some information from the file name to a specific target (although could you remind me of which tutorial described this? I don't have my regular expression worked out quite yet and I know you JUST talked about how to do this recently). For reference file name formats are all: date_source_animal_ID#_timepoint (example 040825_IUSM_animal_26_M2 ) and I want to pull ID# into the document, and then use that ID number to pull in information from the associated list.

Right now, I cannot seem to define that 'ID' as the target for the replacement information, it is only listed in the 'source' section for the result file rules. Attached a screenshot for reference of what I'm seeing.

 
 
Nick Shulman responded:  2025-04-22 19:06
Here is the page with information about Result File Rules:
https://skyline.ms/wiki/home/software/Skyline/page.view?name=ResultFileRules

It was also talked about in a Webinar last year:
https://skyline.ms/project/home/software/Skyline/events/2024%20Webinars/Webinar%2023/begin.view?

To pick out the ID number from between the last two underscores at the end of the filename, I would use the following regular expression
([^_]+)_[^_]+$
and then use the replacement text:
$1

The "$1" ends up being substituted with whatever was inside of the parentheses from the regular expression.

"[^_]+" matches one or more characters which are not underscores.

There is a bit of an explanation of the parentheses and the "$1" on page 9 of the pdf:
https://skyline.ms/wiki/home/software/Skyline/download.view?entityId=ec43ab1c-bed8-1038-8aae-e465a393ee52&name=ResultFileRules.pdf
-- Nick
 
edoud responded:  2025-04-23 06:44
Thank you so much Nick - I KNEW you had just talked about it.

My issue was the order of operations 1) make the rule/get the info into 'sampleID' and THEN pull in the list 2)change sample ID to 'lookupfromlist'

Probably only because I had 1/4 of the samples already run/already moved to the list.

If anyone looks at this in the future it is minute 25 here https://skyline.ms/project/home/software/Skyline/events/2024%20Webinars/Webinar%2023/begin.view

I appreciate your patience!