-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoverlap.R
More file actions
24 lines (19 loc) · 805 Bytes
/
overlap.R
File metadata and controls
24 lines (19 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
library(dplyr)
library(ggpubr)
library(devtools)
library(grid)
library(ggplot2)
#library(ggvenn)
library(VennDiagram)
library(base)
args <- commandArgs(trailingOnly = TRUE)
setwd("Path/04_fresh2/05.1_recal/overlap")
gatk <- read.table("134inds_DP3GQ0Miss10fullinfoQ100_pos.txt", sep="")
sam <- read.table("samtools_DP3GQ0Miss10Q30_pos.txt", sep="")
angsd <- read.table("134inds_rescaled_angsdrecalq30mindepth400genodepth3_min121_pos.txt", sep="")
poslist<- list(GATK=gatk$V1, Samtools=sam$V1, ANGSD=angsd$V1)
#venn.diagram(x=poslist, filename="OverlapVariants.pdf", output=TRUE)
overlap <- calculate.overlap(poslist)
summary(overlap)
overlap_all <- data.frame(LocusName=overlap$a5)
write.table(overlap_all, file="overlapping_variants_pos.txt", sep="\t", row.names=FALSE, col.names=TRUE, quote=FALSE)