-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6e3f27b
commit aaecc11
Showing
9 changed files
with
55 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,11 @@ | ||
from enum import Enum | ||
|
||
import pandas as pd | ||
|
||
from como.como_utilities import stringlist_to_list | ||
from como.project import Config | ||
from como.utils import stringlist_to_list | ||
|
||
__all__ = ["stringlist_to_list", "Config", "RNASeqPreparationMethod"] | ||
__all__ = ["stringlist_to_list", "Config"] | ||
__version__ = "1.10.0" | ||
|
||
|
||
class RNASeqPreparationMethod(Enum): | ||
TOTAL = "total" | ||
MRNA = "mrna" | ||
SCRNA = "scrna" | ||
|
||
@staticmethod | ||
def from_string(value: str) -> "RNASeqPreparationMethod": | ||
match_value = "".join(c for c in value if c.isascii()).lower() | ||
|
||
match match_value: | ||
case "total" | "trna": | ||
return RNASeqPreparationMethod.TOTAL | ||
case "mrna": | ||
return RNASeqPreparationMethod.MRNA | ||
case "scrna": | ||
return RNASeqPreparationMethod.SCRNA | ||
case _: | ||
possible_values = [t.value for t in RNASeqPreparationMethod] | ||
raise ValueError(f"Filtering technique must be one of {possible_values}; got: {value}") | ||
|
||
|
||
def return_placeholder_data() -> pd.DataFrame: | ||
return pd.DataFrame(data=0, index=pd.Index(data=[0], name="entrez_gene_id"), columns=["expressed", "top"]) |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from enum import Enum | ||
|
||
|
||
class RNASeqPreparationMethod(Enum): | ||
TOTAL = "total" | ||
MRNA = "mrna" | ||
SCRNA = "scrna" | ||
|
||
@staticmethod | ||
def from_string(value: str) -> "RNASeqPreparationMethod": | ||
match_value = "".join(c for c in value if c.isascii()).lower() | ||
|
||
match match_value: | ||
case "total" | "trna": | ||
return RNASeqPreparationMethod.TOTAL | ||
case "mrna": | ||
return RNASeqPreparationMethod.MRNA | ||
case "scrna": | ||
return RNASeqPreparationMethod.SCRNA | ||
case _: | ||
possible_values = [t.value for t in RNASeqPreparationMethod] | ||
raise ValueError(f"Filtering technique must be one of {possible_values}; got: {value}") |
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