Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mutalyzer
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
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
Show more breadcrumbs
Mirrors
mutalyzer
Commits
8c326b3f
Commit
8c326b3f
authored
10 years ago
by
Vermaat
Browse files
Options
Downloads
Patches
Plain Diff
Fix mapview import preprocessing
parent
7a692f14
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
doc/admin.rst
+1
-1
1 addition, 1 deletion
doc/admin.rst
mutalyzer/entrypoints/admin.py
+1
-1
1 addition, 1 deletion
mutalyzer/entrypoints/admin.py
mutalyzer/mapping.py
+2
-2
2 additions, 2 deletions
mutalyzer/mapping.py
with
4 additions
and
4 deletions
doc/admin.rst
+
1
−
1
View file @
8c326b3f
...
...
@@ -63,7 +63,7 @@ For example, to import transcript mappings for the GRCh37 assembly, run the
following::
$ wget ftp://ftp.ncbi.nih.gov/genomes/H_sapiens/ARCHIVE/BUILD.37.2/mapview/seq_gene.md.gz
$ zcat seq_gene.md.gz | sort -k 11,11 -k 2,2 > seq_gene.sorted.md
$ zcat seq_gene.md.gz | sort
-t $'\t'
-k 11,11 -k 2,2 > seq_gene.sorted.md
$ mutalyzer-admin assemblies import-mapview seq_gene.sorted.md 'GRCh37.p2-Primary Assembly'
.. note:: The last argument, ``GRCh37.p2-Primary Assembly``, defines the group
...
...
This diff is collapsed.
Click to expand it.
mutalyzer/entrypoints/admin.py
+
1
−
1
View file @
8c326b3f
...
...
@@ -217,7 +217,7 @@ def main():
description
=
import_mapview
.
__doc__
.
split
(
'
\n\n
'
)[
0
],
epilog
=
'
Note: We require that FILE is sorted on the `feature_id`
'
'
(#11) and `chromosome` (#2) columns. This can be done with a
'
'
`sort -k 11,11 -k 2,2` command.
'
)
'
`sort
-t $
\'\\
t
\'
-k 11,11 -k 2,2` command.
'
)
p
.
set_defaults
(
func
=
import_mapview
)
p
.
add_argument
(
'
mapview_file
'
,
metavar
=
'
FILE
'
,
type
=
argparse
.
FileType
(
'
r
'
),
...
...
This diff is collapsed.
Click to expand it.
mutalyzer/mapping.py
+
2
−
2
View file @
8c326b3f
...
...
@@ -886,7 +886,7 @@ def import_from_mapview_file(assembly, mapview_file, group_label):
(#11), which always contains the gene identifier, and then on the
`chromosome` column (#2).
sort -k 11,11 -k 2,2 seq_gene.md > seq_gene.by_gene.md
sort
-t $
'
\t
'
-k 11,11 -k 2,2 seq_gene.md > seq_gene.by_gene.md
Raises :exc:`ValueError` if `mapview_file` is not sorted this way.
...
...
@@ -1004,7 +1004,7 @@ def import_from_mapview_file(assembly, mapview_file, group_label):
processed_keys
=
set
()
for
key
,
records
in
groupby
(
read_records
(
mapview_file
),
itemgetter
(
'
feature_id
'
,
'
chromosome
'
)):
itemgetter
(
'
feature_id
'
,
'
chromosome
'
)):
if
key
in
processed_keys
:
raise
MapviewSortError
(
'
Mapview file must be sorted by feature_id
'
'
and chromosome (try `sort -k 11,11 -k
'
...
...
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