Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/htruong/grep.fas
FASTA grep
https://github.com/htruong/grep.fas
Last synced: about 1 month ago
JSON representation
FASTA grep
- Host: GitHub
- URL: https://github.com/htruong/grep.fas
- Owner: htruong
- Created: 2013-06-27T22:21:46.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-10-22T22:26:40.000Z (about 11 years ago)
- Last Synced: 2024-10-12T16:58:42.376Z (2 months ago)
- Language: Go
- Size: 125 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
grep.fas
====This one is like grep, but it works for fasta files.
Install
---
$ go get -u github.com/htruong/grep.fasUsage
---
Usage of grep.fas:
-1=false: Match the first sequence only
-d=true: Prints description lines
-n=false: Match the numbered sequences instead of matching strings, separated by commas (,)
-s=true: Prints sequences linesExamples
---$ cat myfile.fas
>gi|5524211|gb|AAD44166.1| cytochrome b [Elephas maximus maximus]
LCLYTHIGRNIYYGSYLYSETWNTGIMLLLITMATAFMGYVLPWGQMSFWGATVITNLFSAIPYIGTNLV
EWIWGGFSVDKATLNRFFAFHFILPFTMVALAGVHLTFLHETGSNNPLGLTSDSDKIPFHPYYTIKDFLG
LLILILLLLLLALLSPDMLGDPDNHMPADPLNTPLHIKPEWYFLFAYAILRSVPNKLGGVLALFLSIVIL
GLMPFLHTSKHRSMMLRPLSQALFWTLTMDLLTLTWIGSQPVEYPYTIIGQMASILYFSIILAFLPIAGX
IENY
>gi|157367481|gb|ABV45613.1| cytochrome b [Mammuthus primigenius]
MTHIRKSHPLLKIINKSFIDLPTPSNISTWWNFGSLLGACLITQILTGLFLAMHYTPDTMTAFSSMSHIC
RDVNYGWIIRQLHSNGASIFFLCLYTHIGRNIYYGSYLYSETWNTGIMLLLITMATAFMGYVLPWGQMSF
WGATVITNLFSAIPYIGTDLVEWIWGGFSVDKATLNRFFALHFILPFTMIALAGVHLTFLHETGSNNPLG
LTSDSDKIPFHPYYTIKDFLGLLILISLLLLLALLSPDMLGDPDNYMPADPLNTPLHIKPEWYFLFAYAI
LRSVPNKLGGVLALLLSILILGMMPLLHTSKHRSMMLRPLSQVLFWTLATDLLMLTWIGSQPVEHPYIII
GQMASILYFSIILAFLPIAGMIENYLIK
>junk
GQMASILYFSIILAFLPIAGMIENYLIK$ cat myfile.fas | grep.fas "Mammuthus"
>gi|157367481|gb|ABV45613.1| cytochrome b [Mammuthus primigenius]
MTHIRKSHPLLKIINKSFIDLPTPSNISTWWNFGSLLGACLITQILTGLFLAMHYTPDTMTAFSSMSHIC
RDVNYGWIIRQLHSNGASIFFLCLYTHIGRNIYYGSYLYSETWNTGIMLLLITMATAFMGYVLPWGQMSF
WGATVITNLFSAIPYIGTDLVEWIWGGFSVDKATLNRFFALHFILPFTMIALAGVHLTFLHETGSNNPLG
LTSDSDKIPFHPYYTIKDFLGLLILISLLLLLALLSPDMLGDPDNYMPADPLNTPLHIKPEWYFLFAYAI
LRSVPNKLGGVLALLLSILILGMMPLLHTSKHRSMMLRPLSQVLFWTLATDLLMLTWIGSQPVEHPYIII
GQMASILYFSIILAFLPIAGMIENYLIK$ cat myfile.fas | grep.fas -d=false "Mammuthus"
MTHIRKSHPLLKIINKSFIDLPTPSNISTWWNFGSLLGACLITQILTGLFLAMHYTPDTMTAFSSMSHIC
RDVNYGWIIRQLHSNGASIFFLCLYTHIGRNIYYGSYLYSETWNTGIMLLLITMATAFMGYVLPWGQMSF
WGATVITNLFSAIPYIGTDLVEWIWGGFSVDKATLNRFFALHFILPFTMIALAGVHLTFLHETGSNNPLG
LTSDSDKIPFHPYYTIKDFLGLLILISLLLLLALLSPDMLGDPDNYMPADPLNTPLHIKPEWYFLFAYAI
LRSVPNKLGGVLALLLSILILGMMPLLHTSKHRSMMLRPLSQVLFWTLATDLLMLTWIGSQPVEHPYIII
GQMASILYFSIILAFLPIAGMIENYLIK$ cat myfile.fas | grep.fas -n 1,3
>gi|5524211|gb|AAD44166.1| cytochrome b [Elephas maximus maximus]
LCLYTHIGRNIYYGSYLYSETWNTGIMLLLITMATAFMGYVLPWGQMSFWGATVITNLFSAIPYIGTNLV
EWIWGGFSVDKATLNRFFAFHFILPFTMVALAGVHLTFLHETGSNNPLGLTSDSDKIPFHPYYTIKDFLG
LLILILLLLLLALLSPDMLGDPDNHMPADPLNTPLHIKPEWYFLFAYAILRSVPNKLGGVLALFLSIVIL
GLMPFLHTSKHRSMMLRPLSQALFWTLTMDLLTLTWIGSQPVEYPYTIIGQMASILYFSIILAFLPIAGX
IENY
>junk
GQMASILYFSIILAFLPIAGMIENYLIK