Commit 7613949e authored by Kosmas Hench's avatar Kosmas Hench

include 2.2.10 NewHybrids

parent 49156497
......@@ -4,5 +4,6 @@
.Ruserdata
1-output
2_output/08_popGen/*
2_output/07_phased_variants/*
!2_output/08_popGen/00_synteny
2_output/09_expression/*
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# spid-file generated: Wed Jun 20 16:29:25 CEST 2018
# VCF Parser questions
PARSER_FORMAT=VCF
# Only output SNPs with a phred-scaled quality of at least:
VCF_PARSER_QUAL_QUESTION=
# Select population definition file:
VCF_PARSER_POP_FILE_QUESTION=
# What is the ploidy of the data?
VCF_PARSER_PLOIDY_QUESTION=DIPLOID
# Do you want to include a file with population definitions?
VCF_PARSER_POP_QUESTION=false
# Output genotypes as missing if the phred-scale genotype quality is below:
VCF_PARSER_GTQUAL_QUESTION=
# Do you want to include non-polymorphic SNPs?
VCF_PARSER_MONOMORPHIC_QUESTION=false
# Only output following individuals (ind1, ind2, ind4, ...):
VCF_PARSER_IND_QUESTION=
# Only input following regions (refSeqName:start:end, multiple regions: whitespace separated):
VCF_PARSER_REGION_QUESTION=
# Output genotypes as missing if the read depth of a position for the sample is below:
VCF_PARSER_READ_QUESTION=
# Take most likely genotype if "PL" or "GL" is given in the genotype field?
VCF_PARSER_PL_QUESTION=false
# Do you want to exclude loci with only missing data?
VCF_PARSER_EXC_MISSING_LOCI_QUESTION=false
# NEWHYBRIDS Writer questions
WRITER_FORMAT=NEWHYBRIDS
# Specify which data type should be included in the NEWHYBRIDS file:
NEWHYBRIDS_WRITER_DATA_TYPE_QUESTION=SNP
substrAllRight <- function(x, n){substr(x, n+1, nchar(x))}
substrRight <- function(x, n){substr(x, nchar(x)-n+1, nchar(x))}
theme_mapK <- theme_minimal()+
theme(panel.grid = element_blank(),
text=element_text(size=10),
axis.text.y = element_text(size = 7),
axis.text.x = element_text(size = 7))
GeomCustom <- ggproto(
"GeomCustom",
Geom,
setup_data = function(self, data, params) {
data <- ggproto_parent(Geom, self)$setup_data(data, params)
data
},
draw_group = function(data, panel_scales, coord) {
vp <- grid::viewport(x=data$x, y=data$y)
g <- grid::editGrob(data$grob[[1]], vp=vp)
ggplot2:::ggname("geom_custom", g)
},
required_aes = c("grob","x","y")
)
geom_custom <- function(mapping = NULL,
data = NULL,
stat = "identity",
position = "identity",
na.rm = FALSE,
show.legend = NA,
inherit.aes = FALSE,
...) {
layer(
geom = GeomCustom,
mapping = mapping,
data = data,
stat = stat,
position = position,
show.legend = show.legend,
inherit.aes = inherit.aes,
params = list(na.rm = na.rm, ...)
)
}
getPofZ <- function(runname,pops){
colN <- c(paste(c(pops[1],pops[1],pops[2],pops[2]),
c('Pure','BC','Pure','BC'),sep = ''))
NHres <-read.csv(paste('../../2_output/08_popGen/11_newHyb/NH_PofZ/newHyb.',runname,'.txt_PofZ.txt',sep=''),sep='\t',
col.names = c('indNR','IndivName',
colN[1],colN[3],
'F1','F2',colN[2],colN[4]))
NHres$IndivName <- read.csv(paste('../../2_output/08_popGen/11_newHyb/NH_PofZ/newHyb.',runname,'_individuals.txt',sep=''),
header = F,col.names = c('IndivName'))[,1] %>%
as.character()
IND_inventory <- read.csv('../../0_data/0_resources/sample_id.csv',sep='\t',header = F,
col.names = c('ID','IndivName','spec','pop','loc'),
stringsAsFactors = F)
data <- NHres %>% merge(.,IND_inventory,by='IndivName',sort=F) %>%
select(IndivName,spec,pop,one_of(colN[1],colN[3],'F1','F2',colN[2],colN[4])) %>%
gather(key = 'BIN',value = "post_prob",4:9) %>%
mutate(RUN=runname)
return(data)
}
plot_fun <- function(data,loc,sel,gl){
pdat <- data %>%
filter(grepl(loc,RUN)) %>%
arrange(spec,IndivName) %>%
mutate(x2=paste0(spec,IndivName),x = as.numeric(as.factor(x2)))
clr=c('#34b434','#99d499',
'#000000',rgb(.4,.4,.4),
"#d45500",'#cf7c44',
'#ffd736','#ffeeaa')
labsRAW <- substrAllRight(levels(as.factor(pdat$x2)),3)
XL <- list(bel=expression('18151','18153','18155','18156','18157','18158','18159','18162','18165','18171',
'18185','18187','18152','18154',bold('18161'),'18166','18169','18172','18174',
'18175','18176',bold('18178'),'18179',bold('18180'),'18163','18261',bold('18267'),
bold('18274'),bold('18276'),'19881','20092','20120','20126','20128','20135','20149'),
hon=expression('20599','20600','20601','20602','20603','20604','20605','20606','20607','20608',
'20609','20610','20551','20552','20553',bold('20554'),'20555','20556',
bold('20558'),bold('20559'),'20625',bold('20633'),'20635','20638','20560',
'20561','20562','20563','20564','20565','20566','20567','20568','20571','20572'),
boc=expression("16_21-30","18418","18424","18428","18436","18901","18902","18903",
"18904","18905","18906","18907","18909","18419","18421","18422",
"18426","18427","18429","18430","18432","18434","18912","18915",
"18917",bold("27678"),"16_31-40","18420","18435","18439","18440","18441",
"18442","18445","18446","18447","18448","18450","18454"))
groblist <- tibble(RUN=gsub('XX',loc,c('nigXX-pueXX','nigXX-uniXX','pueXX-uniXX')),
grob = gl )
dotdat <- pdat %>%
group_by(IndivName) %>%
summarise(spec=spec[1],
x=x[1],
RUN=gsub('XX',loc,c('pueXX-uniXX')))
Grobx=max(pdat$x)+1
p <- ggplot(pdat,
aes(x=x,fill=BIN))+
facet_grid(RUN~.)+
geom_hline(yintercept=c(0,.5,1),col=rgb(.9,.9,.9))+
geom_custom(data=groblist, aes(grob=grob), inherit.aes = FALSE,
x = 1, y=0.535)+
geom_point(inherit.aes = F, data=dotdat,
aes(x=x,y=-.09,col=spec),size=2)+
geom_point(inherit.aes = F, data=dotdat,
aes(x=x,y=-.09),col='black',size=2,shape=1)+
geom_bar(aes(y=post_prob),stat = 'identity',position = "stack")+
scale_fill_manual('class',values=clr)+
scale_color_manual(values = c('#000000','#d45500','#ffffff'))+
scale_y_continuous('',breaks = c(0,.5,1))+
scale_x_continuous(breaks=1:(Grobx-1)-.5,labels=XL[[sel]])+
theme_minimal()+
theme(panel.grid = element_blank(),
axis.text.y = element_text(size = 7),
axis.text.x = element_text(angle = 90,size = 7),
axis.title.x = element_blank(),
legend.position = 'none',
strip.background = element_blank(),
strip.text = element_blank())
return(p)
}
\ No newline at end of file
#!/usr/bin/env Rscript
args = commandArgs(trailingOnly=FALSE)
args = args[7:9]
print(args[1])
print( paste("/",args[1],"/",sep=''))
library(parallelnewhybrid)
setwd(args[2])
path.hold <- getwd()
your.NH <- paste0(args[3],"/newhybrids/")
parallelnh_OSX(folder.data = paste0(path.hold,"/",args[1],"/"),
where.NH = your.NH, burnin = 1000000, sweeps = 3000000)
\ No newline at end of file
# ----------- cleaning -------------
#!/usr/bin/env Rscript
# Rscript --vanilla subsetSNPs_byFST.R $WORK
args = commandArgs(trailingOnly=FALSE)
library(tidyverse)
in_list <- c('puebel-unibel','nigbel-puebel','nigbel-unibel',
'puehon-unihon','nighon-puehon','nighon-unihon',
'pueboc-uniboc','nigboc-pueboc','nigboc-uniboc')
filter1000snps <- function(name){
raw <- read.csv(gzfile(paste0(args[7],'2_output/08_popGen/05_fst/fst.gw.',name,'.weir.fst.gz')),sep='\t') %>%
mutate(FST_RANK = rank(-WEIR_AND_COCKERHAM_FST,ties.method = "random")) %>%
select(CHROM,POS,WEIR_AND_COCKERHAM_FST,FST_RANK)
filterSet <- raw %>% filter(FST_RANK < 1001)
h <- hist(filterSet$WEIR_AND_COCKERHAM_FST)
print(min(filterSet$WEIR_AND_COCKERHAM_FST))
write.table(filterSet %>% select(CHROM,POS),paste0(args[7],'2_output/08_popGen/11_newHyb/snpSets/filterSet.1k.',name,'.snps'),
sep = '\t',row.names = F,quote = F)
return(h)
}
for(k in 1:9){
print(in_list[k])
print(filter1000snps(in_list[k]))
}
\ No newline at end of file
#!/bin/bash
mkdir -p NHsubset
k=$(echo $1 | sed 's/.vcf//g')
grep '#' NHrecode/$1 > NHsubset/$k.subset-$2.vcf
grep -v '#' NHrecode/$1 | shuf -n $2 | sort -k 1 -k2 >> NHsubset/$k.subset-$2.vcf
#PBS -l elapstim_req=01:20:00
#PBS -l memsz_job=10gb
#PBS -b 1
#PBS -l cpunum_job=1
#PBS -N subsFST
#PBS -q clexpress
#PBS -o 2.2.10.1.subsetSNPs_byFST.stdout
#PBS -e 2.2.10.1.subsetSNPs_byFST.stderr
cd $WORK/2_output/08_popGen/11_newHyb
gzip $WORK/2_output/08_popGen/05_fst/fst.gw.*
mkdir -p snpSets
Rscript --vanilla $WORK/0_data/0_scripts/subsetSNPs_byFST.R $WORK
\ No newline at end of file
#PBS -l elapstim_req=02:00:00
#PBS -l memsz_job=10gb
#PBS -b 1
#PBS -l cpunum_job=1
#PBS -N vcf2NH
#PBS -q clexpress
#PBS -o 2.2.10.2.vcf2newHybrids.stdout
#PBS -e 2.2.10.2.vcf2newHybrids.stderr
cd $WORK/2_output/08_popGen/11_newHyb
mkdir -p NHrecode
for k in nigbel-puebel nigbel-unibel puebel-unibel nigboc-pueboc nigboc-uniboc pueboc-uniboc nighon-puehon nighon-unihon puehon-unihon;do
pop1=$(echo $k | sed 's/-/\t/g' | cut -f 1);
pop2=$(echo $k | sed 's/-/\t/g' | cut -f 2);
vcftools \
--gzvcf $WORK/2_output/07_phased_variants/6_phased_mac2.vcf.gz \
--keep $WORK/0_data/0_resources/vcfpops/vcftools_$pop1.pop \
--keep $WORK/0_data/0_resources/vcfpops/vcftools_$pop2.pop \
--thin 3000 \
--out $WORK/2_output/08_popGen/11_newHyb/NHrecode/newHyb.$k \
--positions $WORK/2_output/08_popGen/11_newHyb/snpSets/filterSet.1k.$k.snps \
--recode \
$WORK/0_data/0_scripts/subsetVcf newHyb.$k.recode.vcf 120
mkdir -p NH120
grep '#CHROM' $WORK/2_output/08_popGen/11_newHyb/NHsubset/newHyb.$k.recode.subset-120.vcf | \
cut -f 10- | \
sed 's/\t/\n/g' >$WORK/2_output/08_popGen/11_newHyb/ NH120/newHyb.$k"_individuals.txt"
java -Xmx1024m -Xms512m -jar $SFTWR/PGDSpider_2.1.1.5/PGDSpider2-cli.jar \
-inputfile $WORK/2_output/08_popGen/11_newHyb/NHsubset/newHyb.$k.recode.subset-120.vcf \
-inputformat VCF \
-outputfile $WORK/2_output/08_popGen/11_newHyb/NH120/newHyb.$k.txt \
-outputformat NEWHYBRIDS \
-spid $WORK/0_data/0_resources/vcf2nh.spid
done
\ No newline at end of file
#PBS -l elapstim_req=12:00:00
#PBS -l memsz_job=10gb
#PBS -b 1
#PBS -l cpunum_job=9
#PBS -N runNH
#PBS -q clmedium
#PBS -o 2.2.10.3.run_parallelNewHybrids.stdout
#PBS -e 2.2.10.3.run_parallelNewHybrids.stderr
cd $WORK/2_output/08_popGen/11_newHyb
Rscript --vanilla $WORK/0_data/0_scripts/run_parallelNewHybrids.R NH120 $PWD $SFTWR
mkdir -p NH_PofZ
for k in nigbel-puebel nigbel-unibel puebel-unibel nigboc-pueboc nigboc-uniboc pueboc-uniboc nighon-puehon nighon-unihon puehon-unihon;do
cp N120/NH.Results/newHyb.$k.txt_Results/newHyb.$k.txt_PofZ.txt NH_PofZ/newHyb.$k.txt_PofZ.txt
cp N120/NH.Results/newHyb.$k.txt_Results/newHyb.$k"_individuals.txt" NH_PofZ/newHyb.$k"_individuals.txt"
done
\ No newline at end of file
#!/usr/bin/env Rscriptlibrary(ggplot2)
#!/usr/bin/env Rscript
library(tidyverse)
library(scales)
library(cowplot)
......
#!/usr/bin/env Rscript
library(grid)
library(gridSVG)
library(grImport2)
library(tidyverse)
library(RColorBrewer)
library(cowplot)
#library(grConvert)
library(ggrepel)
source('../../0_data/0_scripts/S13.functions.R')
run_list <- c("nigbel-puebel","nigbel-unibel","puebel-unibel",
"nigboc-pueboc","nigboc-uniboc","pueboc-uniboc",
"nighon-puehon","nighon-unihon","puehon-unihon")
pops_list <- data.frame(pop1=c('pue','nig','pue','pue','nig','uni','nig','uni','uni'),
pop2=c('nig','uni','uni','nig','uni','pue','pue','nig','pue'),
stringsAsFactors = F)
data <- data.frame(IndivName=c(), spec=c(),pop=c(), BIN=c(),
post_prob=c(),RUN=c(),stringsAsFactors = F)
for (k in 1:9) {
data <- rbind(data,getPofZ(runname = run_list[k],
pops = pops_list[k,]))
}
data$BIN <- factor(as.character(data$BIN),
levels = c("F1","F2","nigPure","nigBC",
"puePure","pueBC","uniPure","uniBC"))
pnGrob <- gTree(children=gList(pictureGrob(readPicture("../../0_data/0_img/pue-nig-rot-cairo.svg"))))
nuGrob <- gTree(children=gList(pictureGrob(readPicture("../../0_data/0_img/nig-uni-rot-cairo.svg"))))
upGrob <- gTree(children=gList(pictureGrob(readPicture("../../0_data/0_img/uni-pue-rot-cairo.svg"))))
gl <- list(pnGrob, nuGrob, upGrob)
pbel <- plot_fun(data,'bel',1, gl)
phon <- plot_fun(data,'hon',2, gl)
pboc <- plot_fun(data,'boc',3, gl)
clr<-c('#000000','#d45500','#000000')
fll<-c('#000000','#d45500','#ffffff')
dataAll <- read.csv('../../0_data/0_resources/F1.sample.txt',sep='\t') %>%
mutate(loc=substrRight(as.character(id),3))
belPCA <- readRDS('../../2_output/08_popGen/04_pca/bel/belpca.Rds')
honPCA <- readRDS('../../2_output/08_popGen/04_pca/hon/honpca.Rds')
panPCA <- readRDS('../../2_output/08_popGen/04_pca/pan/panpca.Rds')
introgression_candidates <- c('18161','18178','18180','18267','18274','18276',
'20554','20558','20559','20633','27678')
dataHON <- cbind(dataAll %>% filter(sample=='sample',loc=='hon')%>% select(id,spec),
honPCA$scores); names(dataHON)[3:12]<- paste('PC',1:10,sep='')
exp_varHON <- (honPCA$singular.values[1:10])^2/length(honPCA$maf)
xlabHON <- paste('PC1 (',sprintf("%.1f",exp_varHON[1]*100),'%)')# explained varinace)')
ylabHON <- paste('PC2 (',sprintf("%.1f",exp_varHON[2]*100),'%)')# explained varinace)')
p2 <- ggplot(dataHON,aes(x=PC1,y=PC2,col=spec,fill=spec))+
geom_point(size=1.1,shape=21)+
geom_text_repel(inherit.aes = F,
data=(dataHON %>% filter(gsub('[a-z,A-Z]','',id) %in% introgression_candidates)),
aes(x=PC1,y=PC2,col=spec,label=substr(id,1,5)),angle=30,size=2.5,nudge_y = .01)+
geom_point(inherit.aes = F,data=(dataHON %>% filter(gsub('[a-z,A-Z]','',id) %in% introgression_candidates)),
aes(x=PC1,y=PC2),col=rgb(.5,.5,.5),size=2.5,shape=1)+
scale_color_manual(values=clr,guide=F)+
scale_fill_manual(values=fll,guide=F)+
theme_mapK+
theme(legend.position='bottom',
panel.border = element_rect(color=rgb(.9,.9,.9),fill=rgb(1,1,1,0)),
axis.title.y = element_text(vjust = -7),
axis.title.x = element_text(vjust = 6),
plot.margin = unit(rep(10,4),'pt'))+#coord_equal()+
scale_x_continuous(name=xlabHON,breaks = c(-.2,.5))+
scale_y_continuous(name=ylabHON,breaks = c(-.4,.2));
dataBEL <- cbind(dataAll %>% filter(sample=='sample',loc=='bel') %>% select(id,spec),
belPCA$scores); names(dataBEL)[3:12]<- paste('PC',1:10,sep='')
exp_varBEL <- (belPCA$singular.values[1:10])^2/length(belPCA$maf)
xlabBEL <- paste('PC1 (',sprintf("%.1f",exp_varBEL[1]*100),'%)')
ylabBEL <- paste('PC2 (',sprintf("%.1f",exp_varBEL[2]*100),'%)')
p1 <- ggplot(dataBEL,aes(x=PC1,y=PC2,col=spec,fill=spec))+
geom_point(size=1.1,shape=21)+
geom_text_repel(inherit.aes = F,data=(dataBEL %>% filter(gsub('[a-z,A-Z]','',id) %in% introgression_candidates)),
aes(x=PC1,y=PC2,col=spec,label=substr(id,1,5)),angle=30,size=2.5,nudge_y = .01)+
geom_point(inherit.aes = F,data=(dataBEL %>% filter(gsub('[a-z,A-Z]','',id) %in% introgression_candidates)),
aes(x=PC1,y=PC2),col=rgb(.5,.5,.5),size=2.5,shape=1)+
scale_color_manual(values=clr,guide=F)+
scale_fill_manual(values=fll,guide=F)+
theme_mapK+
theme(legend.position='bottom',
panel.border = element_rect(color=rgb(.9,.9,.9),fill=rgb(1,1,1,0)),
axis.title.y = element_text(vjust = -7),
axis.title.x = element_text(vjust = 6),
plot.margin = unit(rep(10,4),'pt'))+
scale_x_continuous(name=xlabBEL,breaks = c(-.15,.25))+
scale_y_continuous(name=ylabBEL,breaks = c(-.3,.2))
dataPAN <- cbind(dataAll %>% filter(sample=='sample',loc=='boc',spec!='gum')%>% select(id,spec),
panPCA$scores); names(dataPAN)[3:12]<- paste('PC',1:10,sep='')
exp_varPAN <- (panPCA$singular.values[1:10])^2/length(panPCA$maf)
xlabPAN <- paste('PC1 (',sprintf("%.1f",exp_varPAN[1]*100),'%)')
ylabPAN <- paste('PC2 (',sprintf("%.1f",exp_varPAN[2]*100),'%)')
p3 <- ggplot(dataPAN,aes(x=PC1,y=PC2,col=spec,fill=spec))+
geom_point(size=1.1,shape=21)+
geom_text_repel(inherit.aes = F,
data=(dataPAN %>% filter(gsub('[a-z,A-Z]','',id) %in% introgression_candidates)),
aes(x=PC1,y=PC2,col=spec,label=substr(id,1,5)),
angle=30,size=2.5,nudge_y = .01)+
geom_point(inherit.aes = F,data=(dataPAN %>% filter(gsub('[a-z,A-Z]','',id) %in% introgression_candidates)),
aes(x=PC1,y=PC2),col=rgb(.5,.5,.5),size=2.5,shape=1)+
scale_color_manual(values=clr,guide=F)+
scale_fill_manual(values=fll,guide=F)+
theme_mapK+
theme(legend.position='bottom',
panel.border = element_rect(color=rgb(.9,.9,.9),fill=rgb(1,1,1,0)),
axis.title.y = element_text(vjust = -7),
axis.title.x = element_text(vjust = 6),
plot.margin = unit(rep(10,4),'pt'))+
scale_x_continuous(name=xlabPAN,breaks = c(-.15,.2))+
scale_y_continuous(name=ylabPAN,breaks = c(-.2,.2))
cp1 <- plot_grid(pbel+theme(legend.position = 'none'),p1,
phon+theme(legend.position = 'none'),p2,
pboc+theme(legend.position = 'none'),p3,
ncol = 2,rel_heights = c(1,1,1),rel_widths = c(0.65,0.35));
legGrob <- gTree(children=gList(pictureGrob(readPicture("../../0_data/0_img/legend_NH-cairo.svg"))))
belGrob <- gTree(children=gList(pictureGrob(readPicture("../../0_data/0_img/belize-cairo.svg"))))
honGrob <- gTree(children=gList(pictureGrob(readPicture("../../0_data/0_img/honduras-cairo.svg"))))
panGrob <- gTree(children=gList(pictureGrob(readPicture("../../0_data/0_img/panama-cairo.svg"))))
ys <- .005
ysc <- .008
yd <- .3025
labX <- .675
bclr <- rgb(.9,.9,.9)
boxes = data.frame(x=rep(labX-.015,3),y=c(ys,ys+yd+ysc,ys+(yd+ysc)*2))
ggdraw()+
geom_rect(data = boxes, aes(xmin = x, xmax = x + .03, ymin = y, ymax = y + yd),
colour = NA, fill = c(rep(bclr,3)))+
draw_label('Belize', x = labX, y = boxes$y[3]+.13,
size = 13, angle=-90)+
draw_label('Honduras', x = labX, y = boxes$y[2]+.13,
size = 13, angle=-90)+
draw_label('Panama', x = labX, y = boxes$y[1]+.13,
size = 13, angle=-90)+
draw_label('Posterior probability',x=.01,y=.5,size = 15, angle=90)+
draw_grob(legGrob,0,.93,1,.07)+
draw_plot(cp1,.0,0,1,.93)+
draw_grob(belGrob, labX-.0225, boxes$y[3]+.84*yd, .045, .045)+
draw_grob(honGrob, labX-.0225, boxes$y[2]+.84*yd, .045, .045)+
draw_grob(panGrob, labX-.0225, boxes$y[1]+.84*yd, .045, .045)
ggsave('../output/S13.pdf',width = 183,height = 235,units = 'mm',device = cairo_pdf)
......@@ -59,11 +59,11 @@ ptsB$label <- factor(ptsB$label,level=c('fq','bam','fa','plot','txt','vcf'))
edgsA <- rbind(edgR(ptsA1,edgA1),edgR(ptsA2,edgA2),edgR(ptsA3,edgA3))
edgsB <- rbind(edgR(ptsB1,edgB1),edgR(ptsB2,edgB2),edgR(ptsB3,edgB3))
plotList <- data.frame(x=c(0,.33,.66,.84,1,1.9,2.1,1.25,1.5,2.5,
2.64,2.64,2.64,2.64,0,3.5),
y=c(rep(1,10),-1,-.8,-.6,-.4,-.05,0),
label=c('S1','F1','F2','S5','S9','F3','S6','S2','S10','S11','S12','S7','F4','F5','S8','S4'),
status=c(rep(steps[5],15),steps[6]))
plotList <- data.frame(x=c(0,.2,.66,.84,1,1.9,2.1,1.25,1.5,2.5,
2.64,2.64,2.64,2.64,0,3.5,.45),
y=c(rep(1,10),-1,-.8,-.6,-.4,-.05,0,1),
label=c('S1','F1','F2','S5','S9','F3','S6','S2','S10','S11','S12','S7','F4','F5','S8','S4','S13'),
status=c(rep(steps[5],15),steps[6],steps[5]))
```
<center>
```{r plot,fig.width=24, fig.height=17,echo=FALSE}
......@@ -101,7 +101,7 @@ p2 <- ggplot()+
coord_fixed(coord_ratio)+
geom_point(data=(ptsB%>%
filter(status==steps[4] & nr %in% c(1,2,9,21,22,26) |
status==steps[5] & nr %in% c(1,4:7,10:12,15:21,22:25,32:34) |
status==steps[5] & nr %in% c(1,4:7,10:12,15:21,22:25,32:34,40) |
status==steps[6] & nr %in% c(1:2,4,5,7))),
aes(x=x,y=y,color=label,shape=paste(type,2)),size=8)+
geom_point(data=ptsB,aes(x=x,y=y,shape=type,color=label),size=5)+
......
.book .book-header h1 {
padding-left: 20px;
padding-right: 20px;
}
.book .book-header.fixed {
position: fixed;
right: 0;
top: 0;
left: 0;
border-bottom: 1px solid rgba(0,0,0,.07);
}
span.search-highlight {
background-color: #ffff88;
}
@media (min-width: 600px) {
.book.with-summary .book-header.fixed {
left: 300px;
}
}
@media (max-width: 1240px) {
.book .book-body.fixed {
top: 50px;
}
.book .book-body.fixed .body-inner {
top: auto;
}
}
@media (max-width: 600px) {
.book.with-summary .book-header.fixed {
left: calc(100% - 60px);
min-width: 300px;
}
.book.with-summary .book-body {
transform: none;
left: calc(100% - 60px);
min-width: 300px;
}
.book .book-body.fixed {
top: 0;
}
}
.book .book-body.fixed .body-inner {
top: 50px;
}
.book .book-body .page-wrapper .page-inner section.normal sub, .book .book-body .page-wrapper .page-inner section.normal sup {
font-size: 85%;
}
@media print {
.book .book-summary, .book .book-body .book-header, .fa {
display: none !important;
}
.book .book-body.fixed {
left: 0px;
}
.book .book-body,.book .book-body .body-inner, .book.with-summary {
overflow: visible !important;
}
}
.kable_wrapper {
border-spacing: 20px 0;
border-collapse: separate;
border: none;
margin: auto;
}
.kable_wrapper > tbody > tr > td {
vertical-align: top;
}
.book .book-body .page-wrapper .page-inner section.normal table tr.header {
border-top-width: 2px;
}
.book .book-body .page-wrapper .page-inner section.normal table tr:last-child td {
border-bottom-width: 2px;
}
.book .book-body .page-wrapper .page-inner section.normal table td, .book .book-body .page-wrapper .page-inner section.normal table th {
border-left: none;
border-right: none;
}
.book .book-body .page-wrapper .page-inner section.normal table.kable_wrapper > tbody > tr, .book .book-body .page-wrapper .page-inner section.normal table.kable_wrapper > tbody > tr > td {
border-top: none;
}
.book .book-body .page-wrapper .page-inner section.normal table.kable_wrapper > tbody > tr:last-child > td {
border-bottom: none;
}
div.theorem, div.lemma, div.corollary, div.proposition {
font-style: italic;
}
span.theorem, span.lemma, span.corollary, span.proposition {
font-style: normal;
}
div.proof:after {
content: "\25a2";
float: right;
}
.header-section-number {
padding-right: .5em;
}
/*
* Theme 1
*/
.color-theme-1 .dropdown-menu {
background-color: #111111;
border-color: #7e888b;
}
.color-theme-1 .dropdown-menu .dropdown-caret .caret-inner {
border-bottom: 9px solid #111111;
}
.color-theme-1 .dropdown-menu .buttons {
border-color: #7e888b;
}
.color-theme-1 .dropdown-menu .button {
color: #afa790;
}
.color-theme-1 .dropdown-menu .button:hover {
color: #73553c;
}
/*
* Theme 2
*/
.color-theme-2 .dropdown-menu {
background-color: #2d3143;
border-color: #272a3a;
}
.color-theme-2 .dropdown-menu .dropdown-caret .caret-inner {
border-bottom: 9px solid #2d3143;
}
.color-theme-2 .dropdown-menu .buttons {
border-color: #272a3a;
}
.color-theme-2 .dropdown-menu .button {
color: #62677f;
}