Thank you so much, James Ashmore! I realized later that my list of sequence names (from blast) only partially matched the names in my DNAStringSet object. But I wrote a little loop to get complete sequence names and, once that was corrected, your solution worked greatly!
Here is the loop I wrote if anyone is interested:
#select names from your XStringSet
names_in_myXStringSet <- names(myXStringSet)
names_in_myXStringSet <- as.data.frame(names_in_myXStringSet )
colnames(names_in_myXStringSet ) <- "Names"
#Extract complete sequence names and make a new list
final.list <- NULL
for (i in 1:nrow(your.list)) {
sel0 <- your.list$name[[i]] #assuming your list has "name" as the column name
sel1 <- dplyr::filter(names_in_myXStringSet , grepl(sel0, Names))
final.list <- rbind(final.list, sel1)
}
Cheers!