{"id":25977645,"url":"https://github.com/nylander/grepfasta","last_synced_at":"2025-03-05T04:38:48.723Z","repository":{"id":6003313,"uuid":"7226368","full_name":"nylander/grepfasta","owner":"nylander","description":"Yet another grep for FASTA formatted files - with regexp capacity!","archived":false,"fork":false,"pushed_at":"2020-03-24T21:55:38.000Z","size":9,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-24T03:25:13.397Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nylander.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-12-18T16:17:42.000Z","updated_at":"2021-05-31T15:14:44.000Z","dependencies_parsed_at":"2022-07-21T12:18:08.226Z","dependency_job_id":null,"html_url":"https://github.com/nylander/grepfasta","commit_stats":null,"previous_names":[],"tags_count":1,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nylander%2Fgrepfasta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nylander%2Fgrepfasta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nylander%2Fgrepfasta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nylander%2Fgrepfasta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nylander","download_url":"https://codeload.github.com/nylander/grepfasta/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241966988,"owners_count":20050324,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-05T04:38:48.175Z","updated_at":"2025-03-05T04:38:48.717Z","avatar_url":"https://github.com/nylander.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\ngrepfasta.pl - Get entries from FASTA formatted file based on search in header\n\n# SYNOPSIS\n\n    grepfasta.pl [options] -p 'pattern' file \n\n# DESCRIPTION\n\n**grepfasta.pl** will search for the presence of _string_ in\nthe header of a FASTA entry, and print the entry to STDOUT if \na match is found, or print all entries in the file except the\nmatch (if **--inverse** is used).\n\nThe search pattern can be a regular expression (Perl), and can\nbe supplied on command line, or in a file.\n\nIf several patterns are given in the search file, all of them are\nused for matching on all fasta entries.\n\nThe search is repeated for each fasta header in the file until EOF,\nunless the **--max** option is used. The **--max** option only limits\nthe total number of sequences to print, which may be important\nto consider if several search patterns are used in a search file.\n\nThe script can read compressed fasta files (.gz, .zip, .Z, .bz2),\nif gzip and/or bunzip2 are available.\n\n# OPTIONS\n\n- **-h, -?, --help**\n\n    Print a brief help message and exits.\n\n- **-m, --man**\n\n    Prints the manual page and exits.\n\n- **-p, --search-pattern=**_string_\n\n    Supply a search _string_.\n\n    Put separated words (phrases) within single or double quotes (e.g., 'My query').\n\n    Search string may be a regular expression (Perl).\n\n- **-f, --search-file=**_file_\n\n    Supply a search _file_ with search strings.\n\n    Put several search strings on separate lines.\n\n- **-i, --inverse|-v**\n\n    Inverse the output, i.e., print all fasta entries except the matching. \n\n- **--max=_integer_|-n**\n\n    Maximum number of sequences to print. Default: all matches.\n\n- **-d, --debug**\n\n    Do some debug printing.\n\n- **-V, --version**\n\n    Print version.\n\n# USAGE\n\nExamples:\n\n    grepfasta.pl --search-pattern='ABC 12' data/file.fasta\n    grepfasta.pl -p='ABC 12' data/file.fasta\n\n    grepfasta.pl --search-file=data/search_file.txt data/file.fasta\n    grepfasta.pl -f=data/search_file.txt data/file.fasta\n\n    grepfasta.pl -p='ABC 12' --inverse data/file.fasta\n    grepfasta.pl -p='ABC 12' -v data/file.fasta\n\n    grepfasta.pl -p='ABC 12' data/file.fasta.gz\n\n    grepfasta.pl -p='ABC 3' data/file.fasta\n    grepfasta.pl -p='ABC 3' --max=1 data/file.fasta\n\n    grepfasta.pl -p='ABC 1' data/file.fasta\n    grepfasta.pl -p='1$' data/file.fasta\n    grepfasta.pl -p='\\w+\\s+\\d{2}$' data/file.fasta\n    grepfasta.pl -p='[a-z]+\\s+\\d{2}$' data/file.fasta\n    grepfasta.pl -p='^\u003e[a-z]+\\s+\\d{2}$' data/file.fasta\n\n# DEPENDENCIES\n\nUses Perl modules Getopt::Long and Pod::Usage for documentation,\nand gzip/bzip2 for uncompressing.\n\n# AUTHOR\n\nWritten by Johan A. A. Nylander\n\n# LICENSE AND COPYRIGHT\n\nCopyright (c) 2009-2023 Johan Nylander\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n# DOWNLOAD\n\n[https://github.com/nylander/grepfasta](https://github.com/nylander/grepfasta)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnylander%2Fgrepfasta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnylander%2Fgrepfasta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnylander%2Fgrepfasta/lists"}