R Markdown

Pick the top blast hit for each query (the one with the lowest e-value) and plot query coverage vs percentage identity/bitscore

lamprey_best_hits <- lamprey_blast_results %>%
  group_by(qseqid) %>%
  filter(evalue == min(evalue))
  
ggplot(data = lamprey_best_hits, aes(x = qcovs, y = bitscore)) + geom_point() + ggtitle("Lamprey query coverage vs bitscore")

ggplot(data = lamprey_best_hits, aes(x = qcovs, y = pident)) +
  geom_point() + geom_rect(aes(xmin=70, xmax=101, ymin=30, ymax=101), colour="red", fill=NA) + ggtitle("Lamprey query coverage vs percentage identity")

###########################
spotted_gar_best_hits <- spotted_gar_blast_results %>%
  group_by(qseqid) %>%
  filter(evalue == min(evalue))

ggplot(data = spotted_gar_best_hits, aes(x = qcovs, y = bitscore)) + geom_point() + ggtitle("Spotted gar query coverage vs bitscore")

ggplot(data = spotted_gar_best_hits, aes(x = qcovs, y = pident)) + geom_point() + 
  geom_rect(aes(xmin=70, xmax=101, ymin=30, ymax=101), colour="red", fill=NA) + ggtitle("Spotted gar query coverage vs percentage identity")

###############################
zebrafish_best_hits <- zebrafish_blast_results %>%
  group_by(qseqid) %>%
  filter(evalue == min(evalue))

ggplot(data = zebrafish_best_hits, aes(x = qcovs, y = bitscore)) + geom_point() + ggtitle("Zebrafish query coverage vs bitscore")

ggplot(data = zebrafish_best_hits, aes(x = qcovs, y = pident)) + geom_point() +
  geom_rect(aes(xmin=70, xmax=101, ymin=30, ymax=101), colour="red", fill=NA) + ggtitle("Zebrafish query coverage vs percentage identity")

#############################

fugu_best_hits <- fugu_blast_results %>%
  group_by(qseqid) %>%
  filter(evalue == min(evalue))

ggplot(data = fugu_best_hits, aes(x = qcovs, y = bitscore)) + geom_point() + ggtitle("Fugu query coverage vs bitscore")

ggplot(data = fugu_best_hits, aes(x = qcovs, y = pident)) + geom_point() + 
  geom_rect(aes(xmin=70, xmax=101, ymin=30, ymax=101), colour="red", fill=NA) + ggtitle("Fugu query coverage vs percentage identity")

##############################

coelacanth_best_hits <- coelacanth_blast_results %>%
  group_by(qseqid) %>%
  filter(evalue == min(evalue))

ggplot(data = coelacanth_best_hits, aes(x = qcovs, y = bitscore)) + geom_point() + ggtitle("Coelacanth query coverage vs bitscore")

ggplot(data = coelacanth_best_hits, aes(x = qcovs, y = pident)) + geom_point() +
  geom_rect(aes(xmin=70, xmax=101, ymin=30, ymax=101), colour="red", fill=NA) + ggtitle("Coelacanth query coverage vs percentage identity")