Exemplo n.º 1
0
#!/usr/bin/python

import pipeclip
pipeclip.runPipeClip('2_mapped.bam','2',10,2,0,0.01,1,0.01,None)
print 'Done!'

Exemplo n.º 2
0
#!/usr/bin/python

import pipeclip
pipeclip.runPipeClip('2_mapped.bam', '2', 10, 2, 0, 0.01, 1, 0.01, None)
print 'Done!'
Exemplo n.º 3
0
def processCommandArgs():
  infile =  bamFileEntryString.get()
  outputPrefix = prefixEntryString.get()
  matchLength = matchLenString.get()
  mismatch = maxMismatchString.get()
  fdrCluster = fdrEnrichedClusterString.get()
  fdrMutation = fdrReliableMutationString.get()
  error = False
  if not len(pcrRemovalListbox.curselection()) > 0:
    if not error:
      popupError("Please chhose a PCR Removal")
    error = True
  else:
    pcr =  pcrRemovalListbox.curselection()[0]

  if not len(clipTypeListbox.curselection()) > 0:
    if not error:
      popupError("Please choose a clip type")
    error = True
  else:
    clipType = clipTypeListbox.curselection()[0]

  #if not len(speciesListbox.curselection()) > 0:
  #  if not error:
  #    popupError("PLease selection a species")
  #  error = True
  #else:
  #  species =  speciesListbox.curselection()[0]

  if not re.match('[1-4]',mismatch,flags=0):
    if not error:
      popupError("Invalid mismatch parameter; Value Range: [1,4]")
    error = True

  if not re.match('\d+',matchLength,flags=0):
    if not error:
        popupError("Invalid match length parameter")
    error = True
  else:
    if(int(matchLength) < 10):
      popupError("Expected range of values for match length parameter: [10,)");
      error = True

  if not re.match('0?\.\d+',fdrCluster,flags=0):
    if not error:
      popupError("Invalid fdr cluster; Expected Value: (0,1)")
    error = True

  if not re.match('0?\.\d+',fdrMutation,flags=0):
    if not error:
      popupError("Invalid fdr mutation parameter; Expected Value: (0,1)")
    error = True

  if not re.search('\.bam$',infile,flags=0):
    if not error:
      popupError("Invalid BAM File")
    error = True

  if not re.match('^[a-zA-Z0-9\/]+$',outputPrefix,flags=0):
    if not error:
      popupError("Invalid output prefix, must follow regex: ^[a-zA-Z0-9\/]+$")
    error = True

  if not error:
    import pipeclip
    pipeclip.runPipeClip(infile,outputPrefix,int(matchLength),int(mismatch),int(pcr),float(fdrCluster),int(clipType),float(fdrMutation),None)
    popup("Success","Done with analysis.")