Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arraymapVariant-callsMapping
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bo Gao
arraymapVariant-callsMapping
Commits
bdb265fa
Commit
bdb265fa
authored
Mar 20, 2017
by
Bo Gao
Browse files
Options
Downloads
Plain Diff
resolved conficts
Merge branch 'master' of
https://gitlab.isb-sib.ch/bgao/arraymapVariant-callsMapping
parents
58484742
d17c601f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
arraymap2ga4gh.py
+13
-14
13 additions, 14 deletions
arraymap2ga4gh.py
with
13 additions
and
14 deletions
arraymap2ga4gh.py
+
13
−
14
View file @
bdb265fa
...
...
@@ -201,7 +201,6 @@ def cli(input_db, input_collection, output_db, output_collection_individuals, ou
continue
else
:
# new biosample_id, create new biosample
icdmcode
=
get_attribute
(
'
ICDMORPHOLOGYCODE
'
,
sample
)
icdmcode_termid
=
'
PGX:ICDOM:
'
+
re
.
sub
(
'
/
'
,
'
_
'
,
icdmcode
)
...
...
@@ -296,21 +295,21 @@ def cli(input_db, input_collection, output_db, output_collection_individuals, ou
# if same individual_id exists, report an error
if
log
is
not
None
:
click
.
echo
(
'
Duplicate individual_id:
'
+
individual_id
,
file
=
log
)
else
:
individuals
[
individual_id
]
=
{
'
id
'
:
individual_id
,
'
species
'
:
{
'
term_id
'
:
'
NCBITaxon:9606
'
,
'
term_label
'
:
'
Homo sapiens
'
},
'
sex
'
:
{
'
term_id
'
:
'
PATO:0020000
'
,
'
term_label
'
:
'
genotypic sex
'
},
'
updated
'
:
datetime
.
datetime
.
utcnow
()
}
no_individuals
+=
1
else
:
# processing specific attributes
# sex
sex
=
{
'
term_id
'
:
'
PATO:0020000
'
,
'
term_label
'
:
'
genotypic sex
'
}
FemaleMatchObj
=
re
.
search
(
'
^f
'
,
sample
[
'
SEX
'
])
MaleMatchObj
=
re
.
search
(
'
^m
'
,
sample
[
'
SEX
'
])
if
MaleMatchObj
:
individuals
[
individual_id
][
'
sex
'
]
=
{
'
term_id
'
:
'
PATO:0020001
'
,
'
term_label
'
:
'
male genotypic sex
'
}
sex
=
{
'
term_id
'
:
'
PATO:0020001
'
,
'
term_label
'
:
'
male genotypic sex
'
}
elif
FemaleMatchObj
:
individuals
[
individual_id
][
'
sex
'
]
=
{
'
term_id
'
:
'
PATO:0020002
'
,
'
term_label
'
:
'
female genotypic sex
'
}
# adding external identifiers
individuals
[
individual_id
][
'
external_identifiers
'
]
=
external_ids
sex
=
{
'
term_id
'
:
'
PATO:0020002
'
,
'
term_label
'
:
'
female genotypic sex
'
}
individuals
[
individual_id
]
=
{
'
id
'
:
individual_id
,
'
species
'
:
{
'
term_id
'
:
'
NCBITaxon:9606
'
,
'
term_label
'
:
'
Homo sapiens
'
},
'
sex
'
:
sex
,
'
external_identifiers
'
:
external_ids
,
'
updated
'
:
datetime
.
datetime
.
utcnow
()
}
no_individuals
+=
1
################################################################
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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