Created
March 7, 2024 20:51
-
-
Save pgonzale60/95fffe11878fa41dd355e397b41e7394 to your computer and use it in GitHub Desktop.
Run tandem repeat finder and convert the output to TSV
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ln -s $assembly ${strain}.fasta | |
$trf_cmd ${strain}.fasta 2 7 7 80 10 50 2000 -f -h -d -m | |
rm ${strain}.fasta | |
mv ${strain}.fasta.2.7.7.80.10.50.2000.dat ${strain}.trf.dat | |
mv ${strain}.fasta.2.7.7.80.10.50.2000.mask ${strain}.trf.mask | |
grep -P '^[S0-9]' ${strain}.trf.dat | cut -d ' ' -f 1,2,3,4,6,7,8,13,14 | awk '{if(\$1 ~ /Sequence/){chr=\$2} else {print chr, \$0}}' | tr [:blank:] '\t' > ${strain}.trf.tsv | |
rm ${strain}.fasta |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment