-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'refs/heads/master-priv' into master-pub
- Loading branch information
Showing
10 changed files
with
86 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[metadata] | ||
name = sniffles | ||
version = 2.5.2 | ||
version = 2.5.3 | ||
author = Moritz Smolka, Hermann Romanek | ||
author_email = [email protected], [email protected] | ||
description = A fast structural variation caller for long-read sequencing data | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,18 +8,22 @@ | |
# Maintainer: Hermann Romanek | ||
# Contact: [email protected] | ||
# | ||
import logging | ||
import os | ||
import pickle | ||
import json | ||
import gzip | ||
import math | ||
from collections import OrderedDict | ||
from typing import Optional, Union | ||
from functools import cached_property | ||
from typing import Optional | ||
|
||
from sniffles import sv | ||
from sniffles.config import SnifflesConfig | ||
|
||
|
||
log = logging.getLogger(__name__) | ||
|
||
|
||
class SNFile: | ||
header_length: int | ||
_header: Optional[dict] | ||
|
@@ -42,6 +46,22 @@ def index(self) -> dict: | |
def header(self) -> dict: | ||
return self._header | ||
|
||
@cached_property | ||
def reqc(self) -> bool: | ||
""" | ||
Was this file created by an old Version of sniffles we want to redo qc? | ||
""" | ||
if self.config.reqc == 'auto': | ||
try: | ||
build, _, _ = self.header['config']['build'].partition('-') | ||
except (KeyError, AttributeError): | ||
log.warning(f'Unable to determine version of SNF file {self.filename} for auto-reqc') | ||
return True | ||
else: | ||
return build < '2.5.3' | ||
else: | ||
return self.config.reqc | ||
|
||
def is_open(self) -> bool: | ||
return self.handle is not False | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters