semvec/pypi-packages huggingface dataset:
swalign 0.3.7
Smith-Waterman local aligner

# swalign

This package implements a Smith-Waterman style local alignment algorithm. You
can align a query sequence to a reference. The scoring functions can be based
on a matrix, or simple identity. Weights can be adjusted for match/mismatch
and gaps, with gap extention penalties. Additionally, the gap penalty can be
subject to a decay to prioritize long gaps.

The input files are FASTA format sequences, or strings of sequences.

Here is some skeleton code to get you started:

    import swalign
    # choose your own values here… 2 and -1 are common.
    match = 2
    mismatch = -1
    scoring = swalign.NucleotideScoringMatrix(match, mismatch)

    sw = swalign.LocalAlignment(scoring)  # you can also choose gap penalties, etc...
    alignment = sw.align('ACACACTA','AGCACACA')
    alignment.dump()

For other uses, see the script in bin/swalign or https://compgen.io/projects/swalign
inline_files 1.0.0
Read inline files stored inside another file.
Requires Python: >=3.10
Keywords: files,inline,reader,parser

# Inline Files

This Python package allows us to read and interact with *inline files*.

An inline file is a file stored within another file. This parent file can be any kind of file, but a .py file is preferred due to how an inline file is defined.

## Definition

We use the following syntax to define an inline file:

```py
r"""ILF
__ID1__
Hello World!
__ID2:json__
{
    "hello": "world"
}
"""
```

In other words, an inline file must be defined inside a multiline comment, or docstring, and must be preceded by `__[ID]__`, where `[ID]` is the inline file's name. In the example above, there are two inline files, "ID1" and "ID2", with "ID2" having an optional extension.

If an inline file is defined with an extension, the file will be read according to that extension. For example, a JSON file will be processed using the `json` module. Files without an extension are treated as text files. Currently, the module supports `json`, `yaml` and `xml` extensions. Below is another example of an inline file with an extension.

```py
r"""ILF
__file1:yaml__
filename: file1
extension: yaml
```

## Module

The module contains a constructor responsible for reading a file and extracting its inline files. By default, this file will be the file that calls the constructor, but another file can be specified.

The module's main method, `get_file()`, will return an inline file's contents, which can be a string or a structure, if the file has one of the supported extensions.

There is also a `get_extension()` method, used to retrieve an inline file's extension.

## Usage example

```py
from inline_files import InlineFiles

ilf = InlineFiles()

i = ilf.get_file("ID1")

print(i)

r"""ILF
__ID1__
Hello World!
__ID2__
def ping():
    return "pong"
"""
```

### Usage example with extensions

```py
from inline_files import InlineFiles

ilf = InlineFiles()

j = ilf.get_json("J")

print(j["filename"])

r"""ILF
__J:json__
{
    "filename": "J",
    "extension": "json"
}
"""
```