text stringlengths 0 828 |
|---|
:returns: string containing pParse parameters |
.. note: |
# pParse.para params template |
# For help: mail to tuhuijun@ict.ac.cn |
# Time: 2014.12.08 |
[Basic Options] |
datapath = C:\filedirectory\filename |
logfilepath = C:\filedirectory |
outputpath = C:\filedirectory |
[Advanced Options] |
co-elute = 1 |
# 0, output single precursor for single scan; |
# 1, output all co-eluted precursors. |
input_format = raw |
# raw / ms1 |
isolation_width = 1.6 |
# 2 / 2.5 / 3 / 4 |
mars_threshold = -0.5 |
ipv_file = .\IPV.txt |
trainingset = EmptyPath |
[Internal Switches] |
output_mars_y = 0 |
delete_msn = 0 |
output_mgf = 1 |
output_pf = 1 |
debug_mode = 0 |
check_activationcenter = 1 |
output_all_mars_y = 0 |
rewrite_files = 0 |
export_unchecked_mono = 0 |
cut_similiar_mono = 1 |
mars_model = 4 |
output_trainingdata = 0 |
"""""" |
output = str() |
#Basic options |
output = '\n'.join([output, ' = '.join(['datapath', rawfilepath])]) |
output = '\n'.join([output, ' = '.join(['logfilepath', outputpath])]) |
output = '\n'.join([output, ' = '.join(['outputpath', outputpath])]) |
#Advanced options |
output = '\n'.join([output, ' = '.join(['co-elute', str(coElute)])]) |
output = '\n'.join([output, ' = '.join(['input_format', 'raw'])]) |
output = '\n'.join([output, ' = '.join(['isolation_width', |
str(isolationWindow)] |
)]) |
output = '\n'.join([output, ' = '.join(['mars_threshold', '-0.5'])]) |
output = '\n'.join([output, ' = '.join(['ipv_file', '.\IPV.txt'])]) |
output = '\n'.join([output, ' = '.join(['trainingset', 'EmptyPath'])]) |
#Internal Switches |
output = '\n'.join([output, ' = '.join(['output_mars_y', '0'])]) |
output = '\n'.join([output, ' = '.join(['delete_msn', '0'])]) |
output = '\n'.join([output, ' = '.join(['output_mgf', '1'])]) |
output = '\n'.join([output, ' = '.join(['output_pf', '0'])]) |
output = '\n'.join([output, ' = '.join(['debug_mode', '0'])]) |
output = '\n'.join([output, ' = '.join(['check_activationcenter', '1'])]) |
output = '\n'.join([output, ' = '.join(['output_all_mars_y', '0'])]) |
output = '\n'.join([output, ' = '.join(['rewrite_files', '0'])]) |
output = '\n'.join([output, ' = '.join(['export_unchecked_mono', '0'])]) |
output = '\n'.join([output, ' = '.join(['cut_similiar_mono', '1'])]) |
output = '\n'.join([output, ' = '.join(['mars_model', '4'])]) |
output = '\n'.join([output, ' = '.join(['output_trainingdata', '0'])]) |
return output" |
3757,"def writeParams(rawfilepath, outputpath, isolationWindow, coElute=0): |
""""""Generate and write a pParse parameter file. |
:param rawfilepath: location of the thermo "".raw"" file |
:param outputpath: path to the output directory of pParse |
:param isolationWindow: MSn isolation window that was used for the |
aquisition of the specified thermo raw file |
:param coElute: |
:returns: file path of the pParse parameter file |
"""""" |
paramText = generateParams(rawfilepath, outputpath, isolationWindow, |
coElute) |
filename, fileext = os.path.splitext(os.path.basename(rawfilepath)) |
paramPath = aux.joinpath(outputpath, filename+'.pparse.para') |
with open(paramPath, 'wb') as openfile: |
openfile.write(paramText) |
return paramPath" |
3758,"def execute(paramPath, executable='pParse.exe'): |
""""""Execute pParse with the specified parameter file. |
:param paramPath: location of the pParse parameter file |
:param executable: must specify the complete file path of the pParse.exe |
if its location is not in the ``PATH`` environment variable. |
:returns: :func:`subprocess.Popen` return code, 0 if pParse was executed |
successful |
"""""" |
procArgs = [executable, paramPath] |
## run it ## |
proc = subprocess.Popen(procArgs, stderr=subprocess.PIPE) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.