BCM-HGSC / pm-utils

Utilities for project managers
MIT License
0 stars 0 forks source link

Update code to handle different merge_name format #33

Closed jekwatt closed 3 years ago

jekwatt commented 4 years ago

Format 1 (standard): "2020-06-18T160015_ILWGS_TMGCUC_NWD190874_256256_2-FLOWCELL-H2JV7DSXY-H7NFJDSXY-H7NHMDSXY"

Format 2: "TMGCUC.NWD438629-1_2AMP-FLOWCELL-HNL7HDSXX-HWHLTDSXX-HMWGFDSXX"

Format 3: "NWD282009-LIB-ILWGS_TMGCUC_NWD282009_242134_2-ILWGS_TMGCUC_NWD282009_242134_3" "NWD718492-LIB-ILWGS_TMGCUC_NWD718492_242146_2"

jekwatt commented 4 years ago

Controls:

Format 1 (standard): "2020-02-19T080013_ILWGS_Legacy_NWD628172_246024_2-FLOWCELL-H2CFFDSXY-H2J2VDSXY" "2019-06-09T083135_ILWGS_TMCONT_NWD687974_238352_1-FLOWCELL-HKT7JDSXX-HL2JKDSXX"

Format 2: "TMCONT.NWD218413-1_1AMP-FLOWCELL-HF7CFCCXY-HCW7LCCXY-HFFLFCCXY-HFGK2CCXY"

jekwatt commented 4 years ago
import re

# '?:' is for non capturing group
# '-' should come first then '_'

pat = re.compile(r"(?:^|_)(Legacy|TM[A-Z]{4})[._](NWD\d{6})[-_]\d")