rbh2dagchainer: rbh2dagchainer

View source: R/rbh2dagchainer.R

rbh2dagchainerR Documentation

rbh2dagchainer

Description

This function runs DAGchainer (http://dagchainer.sourceforge.net/) given CRBHit pairs and gene positions for both cds1 and cds2. The default options are set to not compare gene positions in base pairs but instead using gene order (gene.idx).

Usage

rbh2dagchainer(
  rbhpairs,
  selfblast1 = NULL,
  selfblast2 = NULL,
  gene.position.cds1 = NULL,
  gene.position.cds2 = NULL,
  dagchainerpath = paste0(find.package("CRBHits"), "/extdata/dagchainer/"),
  gap_open_penalty = 0,
  gap_extension_penalty = -3,
  gap_length = 10000,
  max_match_score = 50,
  max_dist_allowed = 2e+05,
  max_evalue = 0.001,
  ignore_tandem = TRUE,
  only_tandem = FALSE,
  min_number_aligned_pairs = 5,
  type = "bp",
  plotDotPlot = FALSE,
  DotPlotTitle = "DAGchainer results",
  colorBy = "none",
  kaks = NULL,
  ka.max = 5,
  ks.max = 5,
  ka.min = 0,
  ks.min = 0,
  select.chr = NULL
)

Arguments

rbhpairs

(conditional-)reciprocal best hit (CRBHit) pair result (see cds2rbh) [mandatory]

selfblast1

(conditional-)reciprocal best hit (CRBHit) pair selfblast result for cds1 sequences (see cds2rbh) [optional]

selfblast2

(conditional-)reciprocal best hit (CRBHit) pair selfblast result for cds2 sequences (see cds2rbh) [optional]

gene.position.cds1

specify gene position for cds1 sequences (see cds2genepos) [default: NULL]

gene.position.cds2

specify gene position for cds2 sequences (see cds2genepos) [default: NULL]

dagchainerpath

specify the PATH to the DAGchainer binaries [default: /extdata/dagchainer/]

gap_open_penalty

gap open penalty [default: 0]

gap_extension_penalty

gap extension penalty [default: -3]

gap_length

length of a gap (avgerage distance expected between two syntenic genes); if type is set to "idx" use 1 [default: 10000]

max_match_score

Maximum match score [default: 50]

max_dist_allowed

maximum distance allowed between two matches; if type is set to "idx" use 20 [default: 200000]

max_evalue

Maximum E-value [default: 1e-3]

ignore_tandem

ignore tandem duplicates [default = TRUE]

only_tandem

only tandem alignments [default = FALSE]

min_number_aligned_pairs

Minimum number of Aligned Pairs [default: 5]

type

specify if gene order index "idx" or gene base pair position "bp" should be extracted and used with DAGchainer [default: bp]

plotDotPlot

specify if dotplot should be plotted [default: FALSE]

DotPlotTitle

specify DotPlot title [default: 'DAGchainer results']

colorBy

specify if dagchainer groups should be colored by "Ka", "Ks", "Ka/Ks" or "none" [default: none]

kaks

specify Ka/Ks input obtained via 'rbh2kaks()' [default: NULL]

ka.max

specify max Ka to be filtered [default: 5]

ks.max

specify max Ks to be filtered [default: 5]

ka.min

specify min Ka to be filtered [default: 0]

ks.min

specify min Ks to be filtered [default: 0]

select.chr

filter results for chromosome names [default: NULL]

Value

DAGchanier results
1: $gene1.chr
2: $gene1.seq.id
3: $gene1.start
4: $gene1.end
5: $gene1.mid
6: $gene1.idx
7: $gene2.chr
8: $gene2.seq.id
9: $gene2.start
10: $gene2.end
11: $gene2.mid
12: $gene2.idx
13: $evalue
14: $score

Author(s)

Kristian K Ullrich

References

Haas BJ et al. (2004) DAGchainer: a tool for mining segmental genome duplications and synteny. Bioinformatics. 20(18), 3643-3646.

See Also

plot_dagchainer, cds2genepos, tandemdups, rbh2kaks

Examples

## compile dagchainer
CRBHits::make_dagchainer()
## load example sequence data
data("ath", package="CRBHits")
## get selfhits CRBHit pairs
ath_selfhits_crbh <- cds2rbh(
    cds1=ath,
    cds2=ath,
    plotCurve=TRUE)
## get gene position
ath.genepos <- cds2genepos(
    cds=ath,
    source="ENSEMBL")
## get DAGchainer results
ath_selfblast_crbh.dagchainer <- rbh2dagchainer(
    rbhpairs=ath_selfhits_crbh,
    gene.position.cds1=ath.genepos,
    gene.position.cds2=ath.genepos)
head(ath_selfblast_crbh.dagchainer)
## plot dagchainer
plot_dagchainer(
    dag=ath_selfblast_crbh.dagchainer)

kullrich/CRBHits documentation built on March 29, 2024, 11:34 a.m.