Skip to content

Commit

Permalink
feat: remove pandera in bioinformatics
Browse files Browse the repository at this point in the history
  • Loading branch information
Yazawazi committed Jul 15, 2024
1 parent 24843e8 commit 19f0860
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
8 changes: 2 additions & 6 deletions examples/bioinformatics/tel_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import functools
import multiprocessing

import pandas, pandera
import pandas

import funix

Expand Down Expand Up @@ -127,10 +127,6 @@ def test():
return search_telomeres(sRNAs, repeat)


class InputSchema(pandera.DataFrameModel):
sRNAs: pandera.typing.Series[str]


@funix.funix(
description = "A telomere is a region of repetitive DNA sequences at the end of a chromosome. Enter a repeating unit, and a list of sRNAs in the table below, this telomere checker will tell whether each of the sRNAs is a telomere.",
# destination = "column",
Expand All @@ -152,7 +148,7 @@ def telomere_check(
# "CCCTAAACCCTAAACCCTAAAC", # True, 22-nt
# "CTAAACCCTAAACCCTAAACCCT" # True, 25-nt
# ],
sRNAs: pandera.typing.DataFrame[InputSchema] =
sRNAs: pandas.DataFrame =
pandas.DataFrame({"sRNAs":
[
"CCCTAAACCCTAAACCCTAT", # False
Expand Down
12 changes: 2 additions & 10 deletions examples/bioinformatics/vector_strip.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import functools
import multiprocessing

import pandas, pandera
import pandas

import funix

Expand Down Expand Up @@ -95,14 +95,6 @@ def test():
print(code, ":", seq)


class InputSchema(pandera.DataFrameModel):
sRNAs: pandera.typing.Series[str]


class OutputSchema(pandera.DataFrameModel):
original_sRNA: pandera.typing.Series[str]
adapter_removed: pandera.typing.Series[str]


@funix.funix(
description="Remove 3' prime adapter from the end of an RNA-seq",
Expand All @@ -111,7 +103,7 @@ def remove_3_prime_adapter(
# adapter_3_prime: str="TCGTATGCCGTCTTCTGCTT",
adapter_3_prime: str = "TCGTA",
minimal_match_length: int = 8,
sRNAs: pandera.typing.DataFrame[InputSchema] = pandas.DataFrame(
sRNAs: pandas.DataFrame = pandas.DataFrame(
{
"sRNAs": [
"AAGCTCAGGAGGGATAGCGCCTCGTATGCCGTCTTCTGC", # shorter than full 3' adapter
Expand Down

0 comments on commit 19f0860

Please sign in to comment.