Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
celseq2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Holly Ruess
celseq2
Commits
efc58048
Commit
efc58048
authored
Jun 01, 2018
by
yy1533
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
💪
enable demultiplexing run as tagging mode
parent
5ce3bcaa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
3 deletions
+20
-3
celseq2/demultiplex.py
celseq2/demultiplex.py
+18
-1
celseq2/helper.py
celseq2/helper.py
+1
-1
celseq2/version.py
celseq2/version.py
+1
-1
No files found.
celseq2/demultiplex.py
View file @
efc58048
...
...
@@ -82,6 +82,7 @@ def demultiplexing(read1_fpath, read2_fpath, dict_bc_id2seq,
bc_qual_min
=
10
,
is_gzip
=
True
,
save_unknown_bc_fastq
=
False
,
tagging_only
=
False
,
do_bc_rev_complement
=
False
,
do_tx_rev_complement
=
False
,
verbose
=
False
):
...
...
@@ -110,8 +111,18 @@ def demultiplexing(read1_fpath, read2_fpath, dict_bc_id2seq,
bc_fhout
[
'UNKNOWNBC_R2'
]
=
join_path
(
outdir
,
'UNKNOWN'
,
'UNKNOWNBC_R2.fq'
)
if
tagging_only
:
out_fpath_tagged_fq
=
join_path
(
outdir
,
'tagged.fastq'
)
out_fh_tagged_fq
=
open
(
out_fpath_tagged_fq
,
'w'
)
for
bc_seq
,
v
in
bc_fhout
.
items
():
bc_fhout
[
bc_seq
]
=
open
(
v
,
'w'
)
if
bc_seq
.
startswith
(
'UNKNOWN'
):
bc_fhout
[
bc_seq
]
=
open
(
v
,
'w'
)
continue
if
tagging_only
:
bc_fhout
[
bc_seq
]
=
out_fh_tagged_fq
else
:
bc_fhout
[
bc_seq
]
=
open
(
v
,
'w'
)
i
=
0
while
(
True
):
...
...
@@ -310,6 +321,11 @@ def main():
parser
.
add_argument
(
'--save-unknown-bc-fastq'
,
dest
=
'save_unknown_bc_fastq'
,
action
=
'store_true'
)
parser
.
set_defaults
(
save_unknown_bc_fastq
=
False
)
parser
.
add_argument
(
'--tagging-only'
,
dest
=
'tagging_only'
,
action
=
'store_true'
,
help
=
(
'Demultiplexed reads are merged to a file named'
'
\"
tagged.fastq
\"
under --out-dir.'
))
parser
.
set_defaults
(
tagging_only
=
False
)
parser
.
add_argument
(
'--verbose'
,
dest
=
'verbose'
,
action
=
'store_true'
)
parser
.
set_defaults
(
verbose
=
False
)
...
...
@@ -333,6 +349,7 @@ def main():
bc_qual_min
=
args
.
min_bc_quality
,
is_gzip
=
args
.
is_gzip
,
save_unknown_bc_fastq
=
args
.
save_unknown_bc_fastq
,
tagging_only
=
args
.
tagging_only
,
do_bc_rev_complement
=
False
,
do_tx_rev_complement
=
False
,
verbose
=
args
.
verbose
)
...
...
celseq2/helper.py
View file @
efc58048
...
...
@@ -95,7 +95,7 @@ def rmfile(fpath):
def
base_name
(
fpath
,
ext
=
None
):
bs
=
os
.
path
.
basename
(
fpath
)
if
not
(
ext
is
None
or
ext
==
""
):
bs
.
replace
(
ext
,
''
)
bs
=
bs
.
replace
(
ext
,
''
)
bs
=
os
.
path
.
splitext
(
bs
)[
0
]
return
(
bs
)
...
...
celseq2/version.py
View file @
efc58048
__version__
=
'0.5.3'
__version__
=
'0.5.3
.1
'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment