Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
svlib
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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SVdetection
svlib
Commits
ecdbdde9
Commit
ecdbdde9
authored
5 years ago
by
Thomas Faraut
Browse files
Options
Downloads
Patches
Plain Diff
supp_reads becomes max support reads
parent
4645bf7c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
svreader/Annotate.py
+12
-4
12 additions, 4 deletions
svreader/Annotate.py
svreader/pindel.py
+1
-1
1 addition, 1 deletion
svreader/pindel.py
with
13 additions
and
5 deletions
svreader/Annotate.py
+
12
−
4
View file @
ecdbdde9
...
...
@@ -40,6 +40,10 @@ class AnnotatedRecord(object):
def
pos
(
self
):
return
self
.
record
.
pos
@property
def
start
(
self
):
return
self
.
record
.
pos
@property
def
chrom
(
self
):
return
self
.
record
.
chrom
...
...
@@ -48,6 +52,10 @@ class AnnotatedRecord(object):
def
stop
(
self
):
return
self
.
record
.
stop
@property
def
end
(
self
):
return
self
.
record
.
stop
@property
def
svtype
(
self
):
return
self
.
_sv_type
...
...
@@ -72,7 +80,7 @@ class AnnotatedRecord(object):
return
sum
([
s
.
isVariant
for
s
in
self
.
samples
])
def
variant_read_support
(
self
):
return
sum
([
s
.
AltSupport
()
for
s
in
self
.
samples
])
return
max
([
s
.
AltSupport
()
for
s
in
self
.
samples
])
def
qual
(
self
):
return
sum
([
s
.
SQ_score
()
for
s
in
self
.
samples
if
s
.
isVariant
])
...
...
@@ -84,7 +92,7 @@ class AnnotatedRecord(object):
supp_reads
=
self
.
variant_read_support
()
num_supp_samples
=
self
.
num_variant_samples
()
try
:
self
.
record
.
info
[
'
SUPP_READS
'
]
=
supp_reads
self
.
record
.
info
[
'
MAX_
SUPP_READS
'
]
=
supp_reads
self
.
record
.
info
[
'
NUM_SUPP_SAMPLES
'
]
=
num_supp_samples
except
KeyError
:
eprint
(
"
SUPP_READS or NUM_SUPP_SAMPLES absent from record info keys
"
)
...
...
@@ -165,8 +173,8 @@ class VCFReader(SVReader):
def
add_metadata
(
self
):
self
.
addInfo
(
"
SOURCEID
"
,
1
,
"
String
"
,
"
The source sv identifier
"
)
self
.
addInfo
(
"
SUPP_READS
"
,
1
,
"
Integer
"
,
"
N
umber of supporting reads
"
)
self
.
addInfo
(
"
MAX_
SUPP_READS
"
,
1
,
"
Integer
"
,
"
Max n
umber of supporting reads
"
)
self
.
addInfo
(
"
NUM_SUPP_SAMPLES
"
,
1
,
"
Integer
"
,
"
Number of supporting samples
"
)
self
.
addFilter
(
"
LOWSUPPORT
"
,
...
...
This diff is collapsed.
Click to expand it.
svreader/pindel.py
+
1
−
1
View file @
ecdbdde9
...
...
@@ -284,7 +284,7 @@ class PindelRecord(SVRecord):
@property
def
sv_len
(
self
):
return
self
.
__svlen
return
self
.
__sv
_
len
def
addbatch2Id
(
self
,
batch
=
None
):
if
batch
:
...
...
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