Skip to content

Commit

Permalink
Avoiding importing types as *
Browse files Browse the repository at this point in the history
Also imported InferenceResults directly instead of indirectly through
the types .py file (which caused error)
  • Loading branch information
CodingBash committed Jun 13, 2024
1 parent 6ccbea1 commit 61e1a5c
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ ENV PATH="${VENV}/bin:$PATH"

# Install from PyPI
RUN pip install --upgrade pip
RUN pip install crispr-ambiguous-mapping==0.0.149
RUN pip install crispr-ambiguous-mapping==0.0.150
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from .error_models import GuideCountError
from .quality_control_models import QualityControlResult
from .types import *
from .types import GeneralMappingInferenceDict

@dataclass
class SingleInferenceMatchResultValue:
Expand Down Expand Up @@ -52,12 +52,6 @@ class InferenceResult:
inferred_value: CompleteInferenceMatchResult


@dataclass
class WhitelistReporterCountsResult:
observed_guide_reporter_umi_counts_inferred: DefaultDict[Tuple[str,Optional[str],Optional[str]], dict]
quality_control_result: QualityControlResult


@dataclass
class MatchSetWhitelistReporterCounterSeriesResults:
ambiguous_ignored_umi_noncollapsed_counterseries : Optional[pd.Series] = None
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from typeguard import typechecked
from typing import Union, List, Mapping, Tuple, Optional, Any, DefaultDict
from typing import Counter as CounterType
from ..models.types import *
from ..models.types import GeneralMappingInferenceDict, GeneralMatchCountDict, GeneralMismatchCountDict


from collections import Counter
from collections import defaultdict
from ..models.mapping_models import MatchSetWhitelistReporterCounterSeriesResults, CompleteInferenceMatchResult, MatchSetSingleInferenceMatchResult, SurrogateProtospacerMismatchSetWhitelistReporterCounterSeriesResults, SurrogateProtospacerMismatchSingleInferenceMatchResult, AllMatchSetWhitelistReporterCounterSeriesResults
from ..models.mapping_models import MatchSetWhitelistReporterCounterSeriesResults, CompleteInferenceMatchResult, MatchSetSingleInferenceMatchResult, SurrogateProtospacerMismatchSetWhitelistReporterCounterSeriesResults, SurrogateProtospacerMismatchSingleInferenceMatchResult, AllMatchSetWhitelistReporterCounterSeriesResults, InferenceResult
from .crispr_editing_processing import check_match_result_non_error, get_non_error_dict
import pandas as pd

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
from typing import Optional, DefaultDict, Union, Tuple, List
import pandas as pd
from typing import Counter as CounterType
from ..models.types import *
from ..models.mapping_models import CompleteInferenceMatchResult, MatchSetSingleInferenceMatchResult
from ..models.types import GeneralMappingInferenceDict, GeneralAlleleDict, GeneralAlleleCountSeriesDict
from ..models.mapping_models import CompleteInferenceMatchResult, MatchSetSingleInferenceMatchResult, InferenceResult
from ..models.editing_models import (MatchSetWhitelistReporterObservedSequenceCounterSeriesResults,
MatchSetWhitelistReporterObservedSequenceMutationProfiles,
LinkedMutationCounters,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
from ..quality_control.crispr_mapping_quality_control import perform_counts_quality_control
from ..models.mapping_models import *
from ..models.editing_models import *
from ..models.types import *


# TODO: There will probably be some type errors with the DefaultDict when testing on non UMI (since it requires CounterType), so make sure to test with different variations of inputs
Expand Down
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion crispr-ambiguous-mapping/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "crispr-ambiguous-mapping"
version = "0.0.149"
version = "0.0.150"
description = ""
authors = ["Basheer Becerra <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 61e1a5c

Please sign in to comment.