Skip to content

Commit

Permalink
Documentation updates and rename pretext_to_tpf to pretext_to_asm
Browse files Browse the repository at this point in the history
  • Loading branch information
jgrg committed Nov 18, 2024
1 parent 2e7d16e commit 021d682
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,17 @@ Added to your `PATH` if the suggested development venv is set up. Run with

Parses and reformats AGP and TPF files, converting into either format.

### [`pretext-to-tpf`](src/tola/assembly/scripts/pretext_to_tpf.py)
### [`pretext-to-asm`](src/tola/assembly/scripts/pretext_to_asm.py)

Takes the AGP file output by
[PretextView](https://github.com/wtsi-hpag/PretextView)
and creates TPF files containing precise coordinates of the curated assembly.
and the input assembly (usually FASTA), and produces an output assembly in
FASTA and AGP formats. The input and output file formats are determined from
the extensions of the files. FASTA input and output uses the `.fai` index
format, as produced by
[`faidx`](http://www.htslib.org/doc/samtools-faidx.html), and uses a streaming
strategy with a 250 KB buffer to keep memory usage low no matter how large
the chromosome.

## File Formats

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ devel = [

[project.scripts]
asm-format = "tola.assembly.scripts.asm_format:cli"
pretext-to-asm = "tola.assembly.scripts.pretext_to_tpf:cli"
pretext-to-tpf = "tola.assembly.scripts.pretext_to_tpf:cli"
pretext-to-asm = "tola.assembly.scripts.pretext_to_asm:cli"
pretext-to-tpf = "tola.assembly.scripts.pretext_to_asm:cli"
find-overlaps = "tola.assembly.scripts.find_overlaps:cli"

[tool.setuptools.packages.find]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def ul(txt):
@click.command(
help=f"""
Uses fragments in the assembly (AGP) produced by PretextView to find
matching fragments in the assembly (TPF) which was fed into Pretext and
matching fragments in the assembly which was fed into Pretext and
output an assembly made from the input assembly fragments.
{ul("Named Chromsomes")}
Expand Down Expand Up @@ -78,9 +78,13 @@ def ul(txt):
path_type=pathlib.Path,
exists=True,
readable=True,
resolve_path=True,
),
required=True,
help="Assembly file from before curation, which is usually a TPF.",
help="""Assembly before curation, usually a FASTA file.
FASTA files will be indexed, creating a '.fai' and a '.agp' file
alongside the assembly if they are missing or are older than the
FASTA.""",
)
@click.option(
"--pretext",
Expand All @@ -102,8 +106,11 @@ def ul(txt):
path_type=pathlib.Path,
dir_okay=False,
),
help="""Output file, usually a TPF.
If not given, prints to STDOUT in 'STR' format.""",
help="""Output file, usually a FASTA file.
If not given, prints to STDOUT in 'STR' format.
The output file type is determined from its extension. If the outuput is
FASTA ('.fa'), an AGP format file ('.fa.agp') is also written. Other
output files are named after the output file minus its extension.""",
)
# @click.option(
# "--version",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import pytest
from click.testing import CliRunner

from tola.assembly.scripts.pretext_to_tpf import cli
from tola.assembly.scripts.pretext_to_asm import cli


def list_example_assemblies():
Expand Down

0 comments on commit 021d682

Please sign in to comment.