Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support alignment conversion from/to CIGAR #516

Merged
merged 1 commit into from
Dec 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions doc/apidoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@
"Permutation",
"RandomPermutation",
"FrequencyPermutation"
],
"CIGAR strings" : [
"CigarOp",
"read_alignment_from_cigar",
"write_alignment_to_cigar"
]
},

Expand Down
5 changes: 5 additions & 0 deletions doc/examples/scripts/sequence/gene_counts.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,13 @@ def read_iter(fastq_path):
# displayed.
# The alignment itself is also discarded here, but note that it could
# also be used in downstream analysis.
#
# Read alignments are typically stored in file formats like SAM/BAM
# :footcite:`Li2009`.
# The package `pysam <https://pysam.readthedocs.io/en/latest/>`_
# provides an interface to these formats.
# To convert an alignment into a CIGAR string, the function
# :func:`write_alignment_to_cigar()` can be used.

counts = np.zeros(len(sequences), dtype=int)
for gene_index, alignment in mapping_results:
Expand Down
1 change: 1 addition & 0 deletions src/biotite/sequence/align/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
from .alignment import *
from .banded import *
from .buckets import *
from .cigar import *
from .kmeralphabet import *
from .kmertable import *
from .kmersimilarity import *
Expand Down
Loading
Loading