コード例 #1
0
ファイル: fileIO.py プロジェクト: cfperez/smbanalyze
def parseFilename(filename):
  if not filename:
    return None
  try:
    (construct, conditions, slide, mol, pull, force, min, sec,
      series, isBackground) = Pattern.match(filename).groups()
  except AttributeError:
    return None

  slide = toInt(slide)
  mol = toInt(mol)
  pull = toInt(pull) or 1
  force = toNum(force)
  min,sec,series = map(toInt,(min,sec,series))
  series = (series or 1) if min or sec else series
  isBackground = isBackground is not None

  return FileInfo(construct,conditions,slide,mol,pull,force,min,sec,series,isBackground)
コード例 #2
0
ファイル: fileIO.py プロジェクト: kwheeler27/smbanalyze
def parseFilename(filename):
  #construct,conditions,slide,mol,pull=basePattern.match(filename).groups()
  #slide=int(slide); mol=int(mol); pull=int(pull)
  #force=toNum(forcePattern.search(filename).group(1))
  #min,sec,series=map(toNum, timePattern.search(filename).groups())
  #background = bgPattern.search(filename) is not None

  (construct, conditions, slide, mol, pull, force, min, sec,
    series, isBackground) = Pattern.match(filename).groups()

  slide = toInt(slide)
  mol = toInt(mol)
  pull = toInt(pull) or 1
  force = toNum(force)
  min,sec,series = map(toInt,(min,sec,series))
  series = (series or 1) if min or sec else series
  isBackground = isBackground is not None

  return FileInfo(construct,conditions,slide,mol,pull,force,min,sec,series,isBackground)
コード例 #3
0
def parseFilename(filename):
    if not filename:
        return None
    try:
        (construct, conditions, slide, mol, pull, force, min, sec, series,
         isBackground) = Pattern.match(filename).groups()
    except AttributeError:
        return None

    slide = toInt(slide)
    mol = toInt(mol)
    pull = toInt(pull) or 1
    force = toNum(force)
    min, sec, series = map(toInt, (min, sec, series))
    series = (series or 1) if min or sec else series
    isBackground = isBackground is not None

    return FileInfo(construct, conditions, slide, mol, pull, force, min, sec,
                    series, isBackground)