subset_comparisons
handle_filters(include, include_file)
Creates a set including both the given iterable and file's contents.
Source code in src/rna_clique/subset_comparisons.py
make_subset_comparisons(inputs, output_dir, matches)
Creates symlinks to stored dataframes whose samples satisfy a predicate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
inputs
|
Iterable[Path]
|
The Paths to the input dataframe pickles. |
required |
output_dir
|
Path
|
The directory in which to create the symlinks. |
required |
matches
|
Callable[[Path], bool]
|
Function giving whether a sample's Path is included. |
required |
Returns:
| Type | Description |
|---|---|
Iterator[DataFrame]
|
A generator yielding the dataframes whose samples satisfy the predicate. |
Source code in src/rna_clique/subset_comparisons.py
matcher(included=None, excluded=None, include_regex=None)
Returns a function that checks if a string meets certain criteria.
Specifically, the returned function returns a bool indicating whether its argument is in the provided Container or matches the given regex.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
included
|
Optional[Container[str]]
|
A container of strings to be included. |
None
|
excluded
|
Optional[Container[str]]
|
A container of strings to be excluded. |
None
|
include_regex
|
Optional[Pattern]
|
A regular expression to match for inclusion. |
None
|
Returns:
| Type | Description |
|---|---|
Callable[[str], bool]
|
A function that checks if a str matches the regex or included strings. |