How to Calculate the Max-intra and Min-inter Distance distribution?
Installation
To install this package, start R (version "4.0") and enter:
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("DECIPHER")
For older versions of R, please refer to the appropriate Bioconductor release.
step 1. Prepare the distance matrix.
Tool: DistanceMatrix In DECIPHER (R package)
- library(DECIPHER)
- DNAStringSet=readDNAStringSet("S:/xxx.txt")
- a= DistanceMatrix(DNAStringSet,
- type = "matrix",
- includeTerminalGaps = FALSE,
- penalizeGapLetterMatches = FALSE,
- penalizeGapGapMatches = FALSE,
- correction = "none",
- processors = NULL,
- verbose = TRUE)
- write.csv(a, file = "S:/xxxxxxx.csv")
step 2. Search the intra- and inter Distances of all sequences
Tool: Excel
- Use MAXIF and MINIF formula to get intra- and inter Distances for each sequence,公式请使用数组公式;
step 3. Search Max-intra and Min-inter Distances for every species
Tools: Excel, SpeciesIdentify in TaxonDNA
- Use Species Summary Function to get species name list;
- Use VLOOKUP formula to search Max-intra and Min-inter distance for every species (Notice that use Species name list as Lookup_value,and sort the previous intra- and inter Distances results by descending and scending to get the final maximum and minimum results;
step 4. Draw scatter diagram.
The x-coordinate is Max-intra distane, The y-coordinate Min-inter distance.