Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
vidjil
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1,696
Issues
1,696
List
Boards
Labels
Service Desk
Milestones
Merge Requests
88
Merge Requests
88
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vidjil
vidjil
Commits
08182493
Commit
08182493
authored
Nov 05, 2014
by
Mathieu Giraud
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
split-from-imgt.py: creates .fa files with some special sequences
Dd2 and Dd3 may play interesting roles.
parent
3ac7ab5e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
germline/split-from-imgt.py
germline/split-from-imgt.py
+18
-2
No files found.
germline/split-from-imgt.py
View file @
08182493
...
...
@@ -8,12 +8,22 @@ import sys
open_files
=
{}
current_file
=
None
# Create isolated files for some sequences
SPECIAL_SEQUENCES
=
[
'TRDD2*01'
,
'TRDD3*01'
,
]
for
l
in
sys
.
stdin
:
if
">"
in
l
:
current_file
=
None
current_special
=
None
if
"Homo sapiens"
in
l
and
(
"V-REGION"
in
l
or
"D-REGION"
in
l
or
"J-REGION"
in
l
):
system
=
l
.
split
(
'|'
)[
1
][:
4
]
seq
=
l
.
split
(
'|'
)[
1
]
system
=
seq
[:
4
]
if
system
.
startswith
(
'IG'
)
or
system
.
startswith
(
'TR'
):
if
system
in
open_files
:
...
...
@@ -24,9 +34,15 @@ for l in sys.stdin:
current_file
=
open
(
name
,
'w'
)
open_files
[
system
]
=
current_file
if
seq
in
SPECIAL_SEQUENCES
:
name
=
'%s.fa'
%
seq
.
replace
(
'*'
,
'-'
)
print
" ==>"
,
name
current_special
=
open
(
name
,
'w'
)
if
current_file
:
current_file
.
write
(
l
)
if
current_special
:
current_special
.
write
(
l
)
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