-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbarcodegap.Rmd
More file actions
47 lines (35 loc) · 1.17 KB
/
barcodegap.Rmd
File metadata and controls
47 lines (35 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
title: "species_delimitation"
output: html_notebook
---
```{r}
##install packages if needed
#install.packages("BarcodingR")
#install.packages("adegenet")
#install.packages("ape")
library('BarcodingR')
library('ape')
library('adegenet')
dna_ref <- fasta2DNAbin('barcodes_ref.fasta')
#where reference is formatted like this:
#name in fasta, species name
#e.g.
#>clarki_123_-_COX1_gene, Calliphora_clarki
#>niveata_124_-_COX1_gene, Calliphora_niveata
#>nigristima_125_-_COX1_gene, Calliphora_nigristigma
#>nigristigma_126_-_COX1_gene, Calliphora_nigristigma
#>niveata_130_-_COX1_gene, Calliphora_niveata
#>niveata_131_-_COX1_gene, Calliphora_niveata
#>clarki_132_-_COX1_gene, Calliphora_clarki
#>trojana_133_-_COX1_gene, Calliphora_trojana
#>torjana_134_-_COX1_gene, Calliphora_trojana
#>niveata_138_-_COX1_gene, Calliphora_niveata
#>niveata_243_-_COX1_gene, Calliphora_niveata
#>Xanthocera_286_S3_L00_-_COX1_gene, Calliphora_xanthocera
#>Xanthocera_B3_Consensus_-_COX1_gene, Calliphora_xanthocera
#>Xanthocera_B4_Consensus_-_COX1_gene, Calliphora_xanthocera
dna_query <- fasta2DNAbin('barcodes_file.fasta')
#normal sequence file
b.gap <- barcoding.gap(dna_query, dist = "raw")
b.gap
```