{"id":44629825,"url":"https://github.com/xp3i4/linear","last_synced_at":"2026-02-14T16:21:19.405Z","repository":{"id":95034358,"uuid":"457251654","full_name":"xp3i4/linear","owner":"xp3i4","description":"Framework of alignment-free method for variants detection. ","archived":false,"fork":false,"pushed_at":"2024-02-14T04:57:57.000Z","size":12361,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-02-14T05:34:37.899Z","etag":null,"topics":["alignment-free-algorithm","bioinformatics","framework","genomics"],"latest_commit_sha":null,"homepage":"","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/xp3i4.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}},"created_at":"2022-02-09T07:22:20.000Z","updated_at":"2023-10-05T01:56:50.000Z","dependencies_parsed_at":"2024-02-14T05:43:23.404Z","dependency_job_id":null,"html_url":"https://github.com/xp3i4/linear","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xp3i4/linear","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xp3i4%2Flinear","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xp3i4%2Flinear/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xp3i4%2Flinear/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xp3i4%2Flinear/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xp3i4","download_url":"https://codeload.github.com/xp3i4/linear/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xp3i4%2Flinear/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29449366,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T15:52:44.973Z","status":"ssl_error","status_checked_at":"2026-02-14T15:52:11.208Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["alignment-free-algorithm","bioinformatics","framework","genomics"],"created_at":"2026-02-14T16:21:18.637Z","updated_at":"2026-02-14T16:21:19.390Z","avatar_url":"https://github.com/xp3i4.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Linear: ALIgNment-freE framework for long-read vARiants resolution\n====\n![example workflow](https://github.com/xp3i4/linear/actions/workflows/cmake.yml/badge.svg)\n[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n![platforms](https://img.shields.io/badge/platform-linux-informational.svg)\n\nLinear is a long-read analysis framework that employs methods more flexible and efficient than assembly- or alignment-based ones.\nLinear is compatible with existing software including SAMtools, SVs callers, and IGV.\n\n## Build and usage\n### Prerequisites\nPlease make sure the following systems have been installed before building from the source.\n- GNU/Linux GCC ≥ 4.9.0\n- CMAKE ≥ 3.0.0\n- zlib ≥ 1.2\n\n\n```bash\n#To install prerequisites for Debian, Ubuntu, etc.\nsudo apt-get install cmake\nsudo apt-get install zlib1g zlib1g-dev\n\n#To install prerequisites for RedHat, Fedora, etc.\nsudo dnf install cmake\nsudo dnf install zlib-devel\n\n#To install cmake prerequisites for Arch, manjaro,etc.\n#zlib-dev is not needed\nsudo pacman -S cmake\n```\n\n### Build from source\n```bash\n#To build from source, please type in the commandline\nmkdir -p build/release \u0026\u0026 cd $_\nCMake [path to source]\nmake linear -j4 #use 4 threads to compile\n```\n### Generic usage\n```bash\n# Specify modules in Linear\nlinear module [options]\n```\n```bash\n# Check generic help for available modules\nlinear -h\nLinear - options and arguments.\n====================================\n\nSYNOPSIS\n    Linear \u003csubmodules\u003e -h for help\n\nDESCRIPTION\n    -h, --help\n          Display this help message.\n    --version\n          Display version information.\n\nAVAILABLE SUBMODULES:\n    filter: The submodule is to detect SVs signals hidden in long reads.\n          It takes input as long reads and outputs SAM/BAM. Type \"linear filter -h\" for more info.\n\n```\n\n\n## Submodules\n### 1.Filter\nThe filter module named Leaf (pipeline B in the figure) is an ultra-fast SV filter for population-scale long-read SV detection.\nIt is built on generative models, which are computationally efficient and effective in detecting intra-read SVs.\nLeaf outputs SAM/BAM*, which is compatible with alignment-based software.\n\n\u003cp align=\"center\"\u003e\t\n\u003cimg src=\"images/compare_filter_aligner_pipeline_x3.png\" alt=\"drawing\"  width=\"700\"/\u003e\n\u003c/p\u003e\n\n\n####  Usage\n```bash\n#Example 1: Sequence format .fa(stq)(.gz) are supported for input.\nlinear filter read.fa(stq)(.gz) genome.fa(.gz)\n#Following is the status when running the filter\nLinear: ALIgNment-free methods for long-read vARiants resolution\n--Read genomes\n  File: all.fa.gz [24 sequences; 2945 mbases; Elapsed time[s] 19.75 100%]\n--Index::Initiate[100%]\n  Index::Hash    [100%]\n  End creating index Elapsed time[s] 22\n--SRR9001768.fa\n  I/O::in :273300        cpu:32.70[s]    speed:8358.11[rds/thd/s]\n  I/O::out:270400        cpu:135.54[s]   speed:1995.00[rds/thd/s]\n  Compute:273000 cpu:472.13[s] speed:1578.24[rds/thd/s]\n  Processed:270400 time:138.27[s] speed:1955.62[rds/s]\n```\n```bash\n#Example 2: Argument x between the reads and references for more than 2 inputs.\nlinear filter *.fa(stq)(.gz) x *.fa(.gz)\n```\n```bash\n#Example 3: For options help\nLinear filter -h\n\nLinear filter - options and arguments.\n===========================================\n\nSYNOPSIS\n    Linear filter [OPTIONS] read.fa/fastq(.gz) genome.fa(.gz)\n\nDESCRIPTION\n    -h, --help\n          Display this help message.\n    --version\n          Display version information.\n\n  Basic options:\n    -o, --output STR\n          Set the prefix of output. The filter will use the prefix of the filename of reads as the prefix of output if\n          the option isn't set\n    -ot, --output_type INT\n          Set the format of the output file. 1 to enable .APF, an approximate map file for non-standard application; 2 to\n          enable .SAM {DEFAULT}; 4 to enable .BAM; Set values 3 (3=1+2) to enable both .apf and .sam\n    -t, --thread INT\n          Set the number of threads to run. -t 4 {DEFAULT}\n    -g, --gap_len INT\n          Set the minimal length of gaps. -g 50 {DEFAULT}. -g 0 to turn off map of gaps.\n    -rg, --read_group STR\n          Set the name of the read group specified in the SAM header\n    -sn, --sample_name STR\n          Set the name of the sample specified in the SAM header\n\n  More options (tweak):\n    -dup, --duplication INT\n          Redetect duplications for signals of insertions. Enabling (-dup 1) this option will treat many insertions as\n          duplications. This option is off (-dup 0) {DEFAULT}\n    -b, --bal_flag INT\n          Set to Enable/Disable dynamic balancing tasks schedule. -b 1(Enable) {DEFAULT}\n    -p, --preset INT\n          Set predefined sets of parameters. -p 0 {DEFAULT} -p 1 efficient -p 2 additional\n    -i, --index_type INT\n          Choose the type of indices{1, 2}. -i 1 {DEFAULT}\n    -c, --apx_c_flag INT\n          0 to turn off apx map\n    -f, --feature_type INT\n          Set types of features {1,2}. -f 2 (2-mer, 48bases){DEFAULT}\n    -r, --reform_ccs_cigar_flag INT\n          Enable/Disable compressing the cigar string for Pacbio CCS reads. -r 0(Disable) {DEFAULT}\n```\n### Compatibility\n#### SAMtools ![](https://img.shields.io/badge/v1.10-%20tested-success) \n\nCompatibility with samtools 1.10 has been tested.\nResults of the filter are compatible with 'samtools view', 'samtools index' and 'samtools sort'.\n\n#### PBSV  ![](https://img.shields.io/badge/v2.6.2-%20tested-success) \n\nPBSV is a SVs caller for PacBio long reads. Compatibility with PBSV has been tested.\nSet the sample and group name appropriately with option -s when using pbsv discover.\n\n#### SVIM ![](https://img.shields.io/badge/v1.2.0-%20tested-success) \n\nSVIM is an SVs caller for PacBio and ONT reads.\nSVIM takes as input the SAM/BAM.\nThe compatibility of the filter with SVIM has been tested.\nAnd results of the filter can be processed directly by SVIM with default settings.\n\n#### cuteSV ![](https://img.shields.io/badge/v1.0.13-%20tested-success)\n\ncuteSV is an SVs caller for PacBio and ONT reads.\ncuteSV takes as input the SAM/BAM.\nThe compatibility of the filter with cuteSV has been tested.\nAnd results of the filter can be processed directly by cuteSV with default settings.\n\n\n#### IGV ![](https://img.shields.io/badge/v2.8.3-%20tested-success)\n\nIGV is a sequencing visualization tool. Compatibility with IGV has been tested.\nPlease use samtools to convert and index the results of filter before using IGV.\nThe indexed BAM* can be visualized directly by IGV.\n\n\n## Result format\n### SAM/BAM*\nSAM/BAM* is an extension of standard SAM/BAM for virtual alignemnt.\nIt is a superset of the standard SAM/BAM.\nIt also supports alignment whose SAM/BAM* is identical to  the standard SAM/BAM.\n\n3 fields in the standard format are redefined:\n\n- The 6th column, cigar string(denoted by cigar*), is redefined.\ncigar* string includes 4 types of cigar pairs as shown in the following figure where the virtual alignment from A to E are expressed by the cigar pairs =I, =D, XI, and XD. \n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"images/virtual_alignment.png\" alt=\"drawing\"  width=\"400\"/\u003e\n\u003c/p\u003e\n\n- The 10th column, SEQ*, is subsequence from read or reference.\n\n- The 12th column, tag* 'SA:Z', is redefined.\nOther tags are identical to the standard tag, which can be found at [SAM/BAM format](https://samtools.github.io/hts-specs/SAMv1.pdf) and [Optional tags](https://samtools.github.io/hts-specs/SAMtags.pdf).\n\n```bash\n#An example of records in SAM/BAM*.\n#SEQs are generated according to cigars rather than segments of read.\n#Bases in SEQs corresponding to ’49S’ are from read;\n#Bases in SEQs corresponding to ’6=’  are from genome;\n#Bases in SEQs corresponding to '1I'  are from read;\n#Bases in SEQs corresponding to ’35X’ are from read.\n#     if the base is unequal to the corresponding base in the genome,\n#     otherwise the ’N’ is inserted.\n#SA:Z tag is generated according to the cigars and SEQs.\n\n@HD VN:1.6\n@SQ SN:chr10 LN:135534747\n@PG PN:Linear\n@RG ID:1 SM:1\nm140612_082500_42156_c100652082550000001823118110071461_s1_p0/104454/5061_10840\n0 chr10 59256034 255 49S6=1I34=1I31=5I30=1I110=2I1=1I49=3I11=2I49=1I6=4I44=2I74\n=16I1=1I51=17I96=35X26I66=5I40=3I70=2I101=5319S * 0 0 TAGCATAAGCTCTTTAGTTTAATTAG\nATCAGACATTTGTCAATGTTTGTGTCAATGGTTGGCTTTTGTTGCCTTTGCTTTTAGTGTTTTAAGTCATGAAGTCTTTG\n...CCACTTGTGTAGAGAGGATGTGGAGAAAAAGAAATGCTTTTACACAGTTGGTGGGAGTGTAAATTCGTTCAACCACT\nGTAGAAGACAGTGTTGTGATTCCTCAAGACACACNNNTTTTNCGCNNNTTTAANNNCTTTGNAGAACCCAACAATTAATA\n...AGCTGGAAACCATCATTCTCAGCAAACTAACACAGGAACAGAAAACCAAACAC * SA:Z:chr10,59257622,-\n,4379S320M5I4884S,255,27;chr10,59257982,+,1371S3138M338I146S,255,528;\n```\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxp3i4%2Flinear","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxp3i4%2Flinear","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxp3i4%2Flinear/lists"}