doubletrouble
Workflows
Standard Workflow
library(doubletrouble)
library(syntenet)
# Load example data
data(yeast_seq)
data(yeast_annot)
data(diamond_intra)
# Prepare input data
pdata <- process_input(yeast_seq, yeast_annot)
# Classify gene pairs using the standard scheme
c_standard <- classify_gene_pairs(
annotation = pdata$annotation,
blast_list = diamond_intra,
scheme = "standard"
)
# Calculate duplicate frequencies
table(c_standard$Scerevisiae$type)
Note: Inputs are processed protein sequences and gene annotations along with intraspecies DIAMOND search results; output is a list of classified duplicated gene pairs.
When to Use
- To identify and classify duplicated genes from whole-genome protein sequences using
classify_gene_pairs.
- To classify duplicates into different schemes: binary (SD vs SSD), standard (SD, TD, PD, DD), or extended (SD, TD, PD, TRD, DD).
When NOT to Use
- For finding synteny or running sequence similarity searches directly; use
syntenet functions like process_input and run_diamond instead.
- When whole-genome protein sequences (proteome) and gene annotations (GFF3/GTF) are not available.
Data Requirements
- Proteome: List of
AAStringSet objects containing translated sequences of the primary transcripts.
- Annotation: List of
GRanges objects containing genomic coordinates of all features.
- Intraspecies BLAST/DIAMOND results: A list of data frames with tabular output (e.g., from
run_diamond).
Key Parameters
- annotation: Processed annotation list (a
GRangesList object).
- blast_list: A list of data frames with DIAMOND/BLAST tabular output for intraspecies comparisons.
- scheme ("standard"): Classification scheme to use ("binary", "standard", "extended", or "full").
- blast_inter: List of data frames with DIAMOND/BLAST tabular output for interspecies comparisons (required for "extended" and "full" schemes).
Best Practices
- Ensure list names in the annotation match the list names in the sequence object using
setequal(names(seqs), names(annotation)).
- Keep only the longest sequence for each protein-coding gene to avoid isoforms.
- Perform bidirectional similarity searches for interspecies comparisons and collapse them using
collapse_bidirectional_hits before classification.
Common Pitfalls
- Mismatching list names between sequences and annotations: Ensure names are consistent across lists.
- Including multiple isoforms per gene: Filter the input sequences to keep only the longest sequence per gene.
Alternatives
syntenet for synteny detection and running DIAMOND alignments.
Citations
- Ohno 2013, Springer Science & Business Media.
- Buchfink, Reuter, and Drost 2021, Nature Methods.
References
1---2name: doubletrouble3description: doubletrouble4---56# doubletrouble78## Workflows910### Standard Workflow1112```r13library(doubletrouble)14library(syntenet)1516# Load example data17data(yeast_seq)18data(yeast_annot)19data(diamond_intra)2021# Prepare input data22pdata <- process_input(yeast_seq, yeast_annot)2324# Classify gene pairs using the standard scheme25c_standard <- classify_gene_pairs(26 annotation = pdata$annotation,27 blast_list = diamond_intra,28 scheme = "standard"29)3031# Calculate duplicate frequencies32table(c_standard$Scerevisiae$type)33```34*Note*: Inputs are processed protein sequences and gene annotations along with intraspecies DIAMOND search results; output is a list of classified duplicated gene pairs.3536## When to Use37- To identify and classify duplicated genes from whole-genome protein sequences using `classify_gene_pairs`.38- To classify duplicates into different schemes: binary (SD vs SSD), standard (SD, TD, PD, DD), or extended (SD, TD, PD, TRD, DD).3940## When NOT to Use41- For finding synteny or running sequence similarity searches directly; use `syntenet` functions like `process_input` and `run_diamond` instead.42- When whole-genome protein sequences (proteome) and gene annotations (GFF3/GTF) are not available.4344## Data Requirements45- **Proteome**: List of `AAStringSet` objects containing translated sequences of the primary transcripts.46- **Annotation**: List of `GRanges` objects containing genomic coordinates of all features.47- **Intraspecies BLAST/DIAMOND results**: A list of data frames with tabular output (e.g., from `run_diamond`).4849## Key Parameters50- **annotation**: Processed annotation list (a `GRangesList` object).51- **blast_list**: A list of data frames with DIAMOND/BLAST tabular output for intraspecies comparisons.52- **scheme** ("standard"): Classification scheme to use ("binary", "standard", "extended", or "full").53- **blast_inter**: List of data frames with DIAMOND/BLAST tabular output for interspecies comparisons (required for "extended" and "full" schemes).5455## Best Practices56- Ensure list names in the annotation match the list names in the sequence object using `setequal(names(seqs), names(annotation))`.57- Keep only the longest sequence for each protein-coding gene to avoid isoforms.58- Perform bidirectional similarity searches for interspecies comparisons and collapse them using `collapse_bidirectional_hits` before classification.5960## Common Pitfalls61- Mismatching list names between sequences and annotations: Ensure names are consistent across lists.62- Including multiple isoforms per gene: Filter the input sequences to keep only the longest sequence per gene.6364## Alternatives65- `syntenet` for synteny detection and running DIAMOND alignments.6667## Citations68- Ohno 2013, Springer Science & Business Media.69- Buchfink, Reuter, and Drost 2021, Nature Methods.7071## References72- Homepage: bioconductor.org/packages/doubletrouble73- Vignette: https://bioconductor.org/packages/release/bioc/vignettes/doubletrouble/inst/doc/doubletrouble.html