vendredi 29 avril 2022

Bash command to search pattern (sequence) and print everything what's next to the pattern (to the right and left side)

I'm trying to reconstruct a gene sequence based on a PoolSeq file of a population (fasta format) and a conserved area. I want to search the file for matches with this sequence and then build up the neighboring area starting from that conserved sequence.

So I basically need a Bash command to search a fasta file for a sequence segment and to print the neighboring region of the match in every read.

File: Fasta file of dieverse Individuals of a species

Input: 20-30 bp Sequence

Output: All reads with that sequence and the neighboring region in that read

Aucun commentaire:

Enregistrer un commentaire