{"id":25371113,"url":"https://github.com/martgro/fastagrepc","last_synced_at":"2025-07-02T08:08:09.585Z","repository":{"id":275972386,"uuid":"927790735","full_name":"MartGro/fastagrepc","owner":"MartGro","description":"Tool for finding patterns from a csv file in a fastq.gz file, i.e. pattern matching in genomes","archived":false,"fork":false,"pushed_at":"2025-02-05T15:14:53.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T08:29:50.919Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MartGro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-05T14:52:04.000Z","updated_at":"2025-02-05T15:14:57.000Z","dependencies_parsed_at":"2025-02-05T15:46:48.401Z","dependency_job_id":"0429b26f-13b6-4ba1-8c5d-3cb6958aff06","html_url":"https://github.com/MartGro/fastagrepc","commit_stats":null,"previous_names":["martgro/fastagrepc"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MartGro/fastagrepc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MartGro%2Ffastagrepc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MartGro%2Ffastagrepc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MartGro%2Ffastagrepc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MartGro%2Ffastagrepc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MartGro","download_url":"https://codeload.github.com/MartGro/fastagrepc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MartGro%2Ffastagrepc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263099466,"owners_count":23413622,"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-02-15T02:31:17.475Z","updated_at":"2025-07-02T08:08:09.555Z","avatar_url":"https://github.com/MartGro.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FastaGrepC Manual\n\nA fast C implementation for searching patterns in gzipped FASTA files using the Aho-Corasick algorithm.\n\n## Features\n- Fast multi-pattern searching using Aho-Corasick algorithm\n- Searches both forward and reverse strands\n- Case-insensitive search option\n- Supports gzipped FASTA files\n- Configurable sequence context around matches\n- CSV output format\n\n## Installation\n\n```bash\ngcc -o fastagrepc main.c -lz\n```\n\n## Usage\n\n```bash\n./fastagrepc \u003cfasta_file\u003e \u003cpatterns_file\u003e [context] [sequence_only] [ignore_case]\n```\n\n### Parameters\n\n1. `fasta_file`: Input FASTA file (can be gzipped)\n2. `patterns_file`: CSV file containing patterns to search for\n3. `context`: Number of bases to include before and after match (default: 0)\n4. `sequence_only`: Search only in sequences, not headers (1=yes, 0=no, default: 0)\n5. `ignore_case`: Case-insensitive search (1=yes, 0=no, default: 0)\n\n### Pattern File Format\n\nThe pattern file should be a CSV with header row and two columns:\n```csv\nname,sequence\nPattern1,ATCG\nPattern2,GCTA\n```\n\n### Output Format\n\nCSV format with the following columns:\n- header: FASTA sequence header\n- pattern_name: Name of the matched pattern\n- pattern_sequence: Sequence of the matched pattern\n- position: Position in the sequence (0-based)\n- strand: \"forward\" or \"reverse\"\n- context: Sequence context including the match\n\n## Examples\n\n### Basic Search\nSearch for patterns in a FASTA file:\n\n```bash\n./fastagrepc input.fa.gz patterns.csv \u003e results.csv\n```\n\n### With Context\nInclude 10 bases before and after each match:\n\n```bash\n./fastagrepc input.fa.gz patterns.csv 10 \u003e results.csv\n```\n\n### Case-Insensitive Search\nSearch patterns case-insensitively with 5 bases context:\n\n```bash\n./fastagrepc input.fa.gz patterns.csv 5 0 1 \u003e results.csv\n```\n\n### Sample patterns.csv\n```csv\nname,sequence\nPAM1,NGG\nPattern1,ATCGATCG\nsgRNA1,GUUUUAGAGCUA\n```\n\n### Example Output\n```csv\nheader,pattern_name,pattern_sequence,position,strand,context\nchr1,PAM1,NGG,145,forward,ACCNGGTAT\nchr1,sgRNA1,GUUUUAGAGCUA,2010,reverse,TAGCTCTAAAAC\n```\n\n## Performance Considerations\n- Uses Aho-Corasick for efficient multi-pattern matching\n- Memory usage scales with:\n  - Input sequence length\n  - Number of patterns\n  - Context size\n- 1MB buffer size for reading compressed files\n\n## Notes\n- Patterns containing commas will have them replaced with semicolons in output\n- Reverse strand positions are reported in forward strand coordinates\n- N in patterns matches any base\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartgro%2Ffastagrepc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartgro%2Ffastagrepc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartgro%2Ffastagrepc/lists"}