Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
orange-slice
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
mirandaa
orange-slice
Commits
64a1240a
Commit
64a1240a
authored
4 years ago
by
mirandaa
Browse files
Options
Downloads
Patches
Plain Diff
Update msconvert_maker.py
parent
3c9eabe3
Branches
mirandaa-master-patch-27009
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
msconvert_maker.py
+54
-0
54 additions, 0 deletions
msconvert_maker.py
with
54 additions
and
0 deletions
msconvert_maker.py
0 → 100644
+
54
−
0
View file @
64a1240a
import
subprocess
,
os
,
argparse
#subprocess appears unused
def
main
():
#https://pythonmarketer.com/2018/08/25/gooey-gui-for-python-scripts/
parser
=
argparse
.
ArgumentParser
(
description
=
'
Use MSconvert to make time slices of raw files
'
)
parser
.
add_argument
(
'
-r
'
,
'
--start
'
,
type
=
float
,
help
=
'
start time in minutes
'
,
default
=
0
)
parser
.
add_argument
(
'
-s
'
,
'
--step
'
,
type
=
float
,
help
=
'
step size in minutes
'
,
default
=
0.5
)
parser
.
add_argument
(
'
-e
'
,
'
--end
'
,
type
=
float
,
help
=
'
up to how many minutes
'
,
default
=
20
)
parser
.
add_argument
(
'
-b
'
,
'
--basename
'
,
help
=
'
basename to use for the output files
'
,
default
=
'
basename
'
)
parser
.
add_argument
(
'
-x
'
,
'
--execute
'
,
action
=
"
store_true
"
,
help
=
'
execute the command?,
\n
maybe msconvert_maker.py > outfile.bat
'
,
default
=
False
)
args
=
parser
.
parse_args
()
start
=
args
.
start
start
=
float
(
start
)
start
=
start
*
60
base
=
args
.
basename
base
=
str
(
base
)
step
=
args
.
step
step
=
float
(
step
)
step
=
step
*
60
stop
=
args
.
end
stop
=
float
(
stop
)
stop
=
stop
*
60
execute
=
args
.
execute
idx
=
0
lines
=
[]
while
start
<
stop
:
upto
=
start
+
step
line
=
f
'
msconvert .\*.d --outfile
"
{
base
}
_
{
step
}
_
{
idx
}
m.mzml
"
--32 -v --filter
"
peakPicking cwt snr=0.1 peakSpace=0.1 msLevel=1-
"
--filter
"
scanTime [
{
start
}
,
{
upto
-
0.001
}
]
"
--filter
"
titleMaker <RunId>.<ScanNumber>.<ScanNumber>.<ChargeState>
"'
lines
.
append
(
line
)
start
=
upto
idx
=
idx
+
1
# execute or print out
if
execute
:
for
l
in
lines
:
os
.
system
(
l
)
else
:
print
(
'
\n
'
.
join
(
lines
))
#main()
if
__name__
==
"
__main__
"
:
main
()
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment