Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: pre-release cleanup #162

Merged
merged 10 commits into from
Jan 31, 2024
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,8 @@ dmypy.json
# Custom additions
.vscode
.idea
results
.DS_Store
tests/.DS_Store
results_htsinfer
.snakemake
tests/cluster_tests/results_sra_downloads
*.out
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,6 @@ example library:

```json
{
"library_source": {
"file_1": {
"short_name": "hsapiens",
"taxon_id": "9606"
},
"file_2": {
"short_name": "hsapiens",
"taxon_id": "9606"
}
},
"library_stats": {
"file_1": {
"read_length": {
Expand All @@ -62,11 +52,26 @@ example library:
}
}
},
"library_source": {
"file_1": {
"short_name": "hsapiens",
"taxon_id": "9606"
},
"file_2": {
"short_name": "hsapiens",
"taxon_id": "9606"
}
},
"library_type": {
"file_1": "first_mate",
"file_2": "second_mate",
"relationship": "split_mates"
},
"read_orientation": {
"file_1": "SF",
"file_2": "SR",
"relationship": "ISF"
},
"read_layout": {
"file_1": {
"adapt_3": "AATGATACGGCGACC",
Expand All @@ -76,11 +81,6 @@ example library:
"adapt_3": "AATGATACGGCGACC",
"polyA_frac": 10.0
}
},
"read_orientation": {
"file_1": "SF",
"file_2": "SR",
"relationship": "ISF"
}
}
```
Expand Down
26 changes: 14 additions & 12 deletions htsinfer/get_library_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,18 +253,20 @@ def _update_relationship_type(self, concordant, aligned_reads):
self.results.relationship = (
StatesTypeRelationship.not_mates
)
if self.results.relationship == (
StatesTypeRelationship.split_mates
) and (
self.results.file_1 == StatesType.single and
self.results.file_2 == StatesType.single
) or (
self.results.file_1 == StatesType.not_available and
self.results.file_2 == StatesType.not_available
):
# Update first and second relationship
self.results.file_1 = StatesType.first_mate_assumed
self.results.file_2 = StatesType.second_mate_assumed
if (
self.results.relationship == (
StatesTypeRelationship.split_mates
)
and (
(self.results.file_1 == StatesType.single and
self.results.file_2 == StatesType.single) or
(self.results.file_1 == StatesType.not_available and
self.results.file_2 == StatesType.not_available)
)
):
# Update first and second relationship
self.results.file_1 = StatesType.first_mate_assumed
self.results.file_2 = StatesType.second_mate_assumed

class AlignedSegment:
"""Placeholder class for mypy "Missing attribute"
Expand Down
2 changes: 1 addition & 1 deletion htsinfer/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,8 @@ class Results(BaseModel):
read_layout: Read layout inference results.
"""
library_stats: ResultsStats = ResultsStats()
library_type: ResultsType = ResultsType()
library_source: ResultsSource = ResultsSource()
library_type: ResultsType = ResultsType()
read_orientation: ResultsOrientation = ResultsOrientation()
read_layout: ResultsLayout = ResultsLayout()

Expand Down
283 changes: 0 additions & 283 deletions tests/cluster_tests/cluster_test_strategy.py

This file was deleted.

Loading
Loading