#This script will isolate the "DP" values from bcf pile files that result from sequence alignment. #youmust import your dataset into the global environment and let it run install.packages(tidyverse) library(tidyverse) reads_summary <- LVS_pile %>% select(V2,V8) string <- reads_summary %>% select(V8) #THIS WORKS for(i in 1:length(string$V8)){ string$DP[i] <- sub(".*?DP=(.*?);.*", "\\1", string$V8[i]) } #This step will change the data into integers so that the min and max functions can be applied string_DP <- as.integer(string$DP) min_value <- min(string_DP) print(min_value) max_value <- max(string_DP) print(max_value)