Skip to content

Commit

Permalink
refactor: pre-release cleanup (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
balajtimate committed Jan 31, 2024
1 parent 69ea74c commit e100d72
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 380 deletions.
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

0 comments on commit e100d72

Please sign in to comment.