본문으로 건너뛰기
cccskills
무료GitHub에 공개

bioconductor-msa2dist

MSA2dist calculates pairwise distances between all sequences of a DNAStringSet or a AAStringSet using a custom score matrix and conducts codon based analysis. It uses scoring matrices to be used in these pairwise distance calcualtions which can be adapted to any scoring for DNA or AA characters. E.g. by using literal distances MSA2dist calculates pairwise IUPAC distances.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md5.1 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

msa2dist

Workflows

Standard Workflow

MSA2dist calculates pairwise distances between all sequences of a DNAStringSet or a AAStringSet using a custom score matrix and conducts codon based analysis. It uses scoring matrices to be used in these pairwise distance calculations which can be adapted to any scoring for DNA or AA characters. E.g. by using literal distances MSA2dist calculates pairwise IUPAC distances.

library(MSA2dist)
# Load example data
data(hiv, package="MSA2dist")

# 1. Calculate pairwise DNA distances (K80 model)
dna_dist <- dnastring2dist(hiv, model="K80")

# 2. Translate to Amino Acids and calculate Grantham distances
aa_seqs <- cds2aa(hiv)
aa_dist <- aastring2dist(aa_seqs, score=granthamMatrix())

# 3. Calculate synonymous/nonsynonymous substitutions (MYN model)
kaks_myn <- dnastring2kaks(hiv, model="MYN")

Note: Input is a pre-aligned DNAStringSet object, and outputs are distance matrices and a data frame of Ka/Ks values.

When to Use

  • Pairwise Amino Acid Distances: When you need to calculate pairwise distances from a Biostrings::AAStringSet using custom scoring matrices like Grantham's distance (aastring2dist, granthamMatrix).
  • Pairwise DNA Distances: When you need to calculate pairwise nucleotide distances from a Biostrings::DNAStringSet using evolutionary models (e.g., "K80") or literal IUPAC distances for diploid phasing (dnastring2dist).
  • Synonymous/Nonsynonymous Substitutions: When you need to calculate Ka, Ks, and Ka/Ks ratios from coding sequences using models like Li, NG86, or MYN (dnastring2kaks).

When NOT to Use

  • Non-coding Sequences: For non-coding sequences where codon-based Ka/Ks analysis is not applicable (use standard nucleotide distance tools like ape::dist.dna instead).
  • Initial Alignment: For performing the initial multiple sequence alignment (MSA) itself (use external tools like mafft, muscle, or the R package msa first).

Data Requirements

  • Pre-aligned sequences (Multiple Sequence Alignment) represented as a Biostrings::DNAStringSet or Biostrings::AAStringSet.
  • Coding sequences must have lengths that are multiples of three for translation, or forced via cds2aa(shorten=TRUE).

Key Parameters

  • model ("K80"): The evolutionary model to use in dnastring2dist (e.g., "K80", "IUPAC") or dnastring2kaks (e.g., "Li", "NG86", "MYN", "YN").
  • score (NULL): Scoring matrix for amino acid distance calculations in aastring2dist (e.g., granthamMatrix()).
  • frame (1): Codon start site (1, 2, or 3) for frame-aware translation in cds2aa.
  • shorten (FALSE): Logical indicating whether to force the coding sequence length to be a multiple of three in cds2aa.
  • genetic.code (standard): Alternative genetic code mapping (e.g., Biostrings::getGeneticCode("2")) in cds2aa.
  • threads (1): Number of threads for parallelized calculations in dnastring2dist or dnastring2kaks.

Best Practices

  • Ensure sequences are pre-aligned before calculating distances or Ka/Ks ratios.
  • Use cds2aa(shorten=TRUE) to handle sequences whose lengths are not multiples of three before translating.
  • Use dnastring2dist(model="IUPAC") to directly calculate distances on IUPAC nucleotide ambiguity encoded sequences (e.g., from diploid individuals).

Common Pitfalls

  • Translation fails or returns empty set: Occurs when the sequence length is not a multiple of three and shorten=FALSE. Fix: Set shorten=TRUE in cds2aa().
  • Incompatible sequence formats for external packages: Trying to pass DNAStringSet directly to ape or seqinr. Fix: Convert formats using dnastring2dnabin() or dnastring2aln().

Alternatives

  • ape: For standard DNA distance calculations (ape::dist.dna) and neighbor-joining trees.
  • seqinr: For standard sequence alignments and codon analysis.
  • msa: For performing multiple sequence alignments in R.

Citations

  • Nei, M. and Gojobori, T. (1986). Simple methods for estimating the numbers of synonymous and nonsynonymous nucleotide substitutions. Molecular Biology and Evolution.
  • Li, W.-H. (1993). Unbiased estimation of the number of synonymous and nonsynonymous substitutions. Journal of Molecular Evolution.
  • Zhang, Z., Li, J., and Yu, J. (2006). CODON-ML: computing evolutionary rates of codons.

References

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

The package contains functions for exploratory oligonucleotide array analysis. The dependence on tkWidgets only concerns few convenience functions. 'affy' is fully functional without it.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

bioMate-AI/biomate-bioconductor-kb7932026년 6월 21일 업데이트

This tool uses the label-tree function from HyPhy to annotate a phylogenetic tree. It allows users to select a subset of leaves using either a regular expression or a list of sequence names, and then apply a specified label to these selecte

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

bioMate-AI/biomate-bioconductor-kb7932026년 6월 21일 업데이트

This package provides a client for the Bioconductor AnnotationHub web resource. The AnnotationHub web resource provides a central location where genomic files (e.g., VCF, bed, wig) and other resources from standard locations (e.g., UCSC, En

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

bioMate-AI/biomate-bioconductor-kb7932026년 6월 21일 업데이트

apeglm provides Bayesian shrinkage estimators for effect sizes for a variety of GLM models, using approximation of the posterior for individual coefficients.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

bioMate-AI/biomate-bioconductor-kb7932026년 6월 21일 업데이트

ASURAT is a software for single-cell data analysis. Using ASURAT, one can simultaneously perform unsupervised clustering and biological interpretation in terms of cell type, disease, biological process, and signaling pathway activity. Inputting a single-cell RNA-seq data and knowledge-based databases, such as Cell Ontology, Gene Ontology, KEGG, etc., ASURAT transforms gene expression tables into original multivariate tables, termed sign-by-sample matrices (SSMs).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

bioMate-AI/biomate-bioconductor-kb7932026년 6월 21일 업데이트

AUCell allows to identify cells with active gene sets (e.g. signatures, gene modules...) in single-cell RNA-seq data. AUCell uses the "Area Under the Curve" (AUC) to calculate whether a critical subset of the input gene set is enriched with

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

bioMate-AI/biomate-bioconductor-kb7932026년 6월 21일 업데이트

bioMate-AI의 스킬 모두 보기

이 스킬의 문제 신고