gene_x 0 like s 369 view s
Tags: bash, Motif Discovery
#!/bin/bash
#./search_motif4.sh test1.fasta GRG 5
if [ $# -ne 3 ]; then
echo "Usage: $0 <fasta_file> <motif> <context>"
exit 1
fi
fasta_file=$1
motif=$2
context=$3
motif_regex=$(echo $motif | sed 's/R/[AG]/g' | sed 's/Y/[CT]/g' | sed 's/S/[GC]/g' | sed 's/W/[AT]/g' | sed 's/K/[GT]/g' | sed 's/M/[AC]/g' | sed 's/B/[CGT]/g' | sed 's/D/[AGT]/g' | sed 's/H/[ACT]/g' | sed 's/V/[ACG]/g')
grep -B1 -A1 -i -E -o ".{0,$context}${motif_regex}.{0,$context}" $fasta_file
点赞本文的读者
还没有人对此文章表态
没有评论
RNA-seq data analysis of Yersinia on GRCh38
Small RNA sequencing processing in the example of smallRNA_7
How to Create a New User on Ubuntu Server?
Transposable element (TEs) and structural variant (SV) detection in bacterial genomes
© 2023 XGenes.com Impressum