Skip to content

Commit

Permalink
add prediction source for promoter activity
Browse files Browse the repository at this point in the history
  • Loading branch information
szhao committed Dec 3, 2024
1 parent b4a13d7 commit aea7f30
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/promoter_activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
query = PromoterActivityQuery(
promoter_sequence=promoter_sequence,
orf_sequence=orf_sequence,
source="expression",
tissue_of_interest={
"heart": ["CNhs10608+", "CNhs10612+"],
"liver": ["CNhs10608+", "CNhs10612+"],
Expand All @@ -31,6 +32,7 @@
queries = PromoterActivityQuery.iter_with_promoter_from_fasta(
fasta_path=fasta_path,
orf_sequence=orf_sequence,
source="expression",
tissue_of_interest={
"heart": ["CNhs10608+", "CNhs10612+"],
"liver": ["CNhs10608+", "CNhs10612+"],
Expand Down
6 changes: 6 additions & 0 deletions ginkgo_ai_client/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ class PromoterActivityQuery(QueryBase):
promoter_sequence: str
orf_sequence: str
tissue_of_interest: Dict[str, List[str]]
source: str
model: str = "borzoi-human-fold0"
query_name: Optional[str] = None

Expand All @@ -279,6 +280,7 @@ def to_request_params(self) -> Dict:
"prom": self.promoter_sequence,
"orf": self.orf_sequence,
"tissue_of_interest": self.tissue_of_interest,
"source": self.source,
}
return {
"model": self.model,
Expand Down Expand Up @@ -314,6 +316,7 @@ def iter_with_promoter_from_fasta(
fasta_path: str,
orf_sequence: str,
tissue_of_interest: Dict[str, List[str]],
source: str,
model: str = "borzoi-human-fold0",
):
"""Return an iterator of PromoterActivityQuery objects from the promoter
Expand All @@ -338,6 +341,7 @@ def iter_with_promoter_from_fasta(
promoter_sequence=str(record.seq),
orf_sequence=orf_sequence,
tissue_of_interest=tissue_of_interest,
source=source,
model=model,
query_name=record.id,
)
Expand All @@ -351,6 +355,7 @@ def list_with_promoter_from_fasta(
fasta_path: str,
orf_sequence: str,
tissue_of_interest: Dict[str, List[str]],
source: str,
model: str = "borzoi-human-fold0",
):
"""Return a list of PromoterActivityQuery objects from the promoter sequences
Expand All @@ -372,6 +377,7 @@ def list_with_promoter_from_fasta(
fasta_path=fasta_path,
orf_sequence=orf_sequence,
tissue_of_interest=tissue_of_interest,
source=source,
model=model,
)
return list(iterator)

0 comments on commit aea7f30

Please sign in to comment.