{"id":25501949,"url":"https://github.com/opengene/cfdnapattern","last_synced_at":"2025-07-20T08:37:27.685Z","repository":{"id":40625849,"uuid":"64360139","full_name":"OpenGene/CfdnaPattern","owner":"OpenGene","description":"Pattern Recognition for Cell-free DNA","archived":false,"fork":false,"pushed_at":"2018-08-03T03:40:52.000Z","size":1202,"stargazers_count":58,"open_issues_count":4,"forks_count":21,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-24T08:42:24.942Z","etag":null,"topics":["bioinformatics","cfdna","ngs","pattern"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/OpenGene.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":"2016-07-28T03:09:46.000Z","updated_at":"2025-03-16T22:49:53.000Z","dependencies_parsed_at":"2022-09-20T12:25:35.513Z","dependency_job_id":null,"html_url":"https://github.com/OpenGene/CfdnaPattern","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenGene%2FCfdnaPattern","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenGene%2FCfdnaPattern/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenGene%2FCfdnaPattern/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenGene%2FCfdnaPattern/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenGene","download_url":"https://codeload.github.com/OpenGene/CfdnaPattern/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248196692,"owners_count":21063484,"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":["bioinformatics","cfdna","ngs","pattern"],"created_at":"2025-02-19T04:59:45.008Z","updated_at":"2025-04-10T09:47:11.101Z","avatar_url":"https://github.com/OpenGene.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CfdnaPattern\nPattern Recognition for Cell-free DNA\n\n# Predict a fastq is cfdna or not\n```shell\n# predict a single file\npython predict.py \u003csingle_fastq_file\u003e\n\n# predict files\npython predict.py \u003cfastq_file1\u003e \u003cfastq_file2\u003e ... \n\n# predict files with wildcard\npython predict.py *.fq\n```\n\n***warning: this tool doesn't work for trimmed fastq***\n\n## prediction output\nFor each file given in the command line, this tool will output a line `\u003cprediction\u003e: \u003cfilename\u003e`, like\n```\ncfdna: /fq/160220_NS500713_0040_AHVNG2BGXX/20160220-cfdna-001_S1_R1_001.fastq.gz\ncfdna: /fq/160220_NS500713_0040_AHVNG2BGXX/20160220-cfdna-001_S1_R2_001.fastq.gz\nnot-cfdna: /fq/160220_NS500713_0040_AHVNG2BGXX/20160220-gdna-002_S2_R1_001.fastq.gz\nnot-cfdna: /fq/160220_NS500713_0040_AHVNG2BGXX/20160220-gdna-002_S2_R2_001.fastq.gz\n```\nAdd `-q` or `--quite` to enable quite output mode, in which it will only output:\n* a file with name of `cfdna`, but prediction is `not-cfdna`\n* a file without name of `cfdna`, but prediction is `cfdna`\n\n# Train a model\nThis tool has a pre-trained model (`cfdna.model`), which can be used for prediction. But you still can train a model by yourself.\n* prepare/link all your fastq files in some folder\n* for files from `cfdna`, include `cfdna` (case-insensitive) in the filename, like `20160220-cfdna-015_S15_R1_001.fq`\n* for files from `genomic DNA`, include `gdna` (case-insensitive) in the filename, like `20160220-gdna-002_S2_R1_001.fq`\n* for files from `FFPE DNA`, include `ffpe` (case-insensitive) in the filename, like `20160123-ffpe-040_S0_R1_001.fq`\n* run:\n```shell\npython train.py /fastq_folder/*.fq\n```\n\n# Citation\nIf you used CfdnaPattern for your publication, please cite: https://doi.org/10.1109/TCBB.2017.2723388\n\nFull options:\n```shell\npython training.py \u003cfastq_files\u003e [options] \n\nOptions:\n  --version             show program's version number and exit\n  -h, --help            show this help message and exit\n  -m MODEL_FILE, --model=MODEL_FILE\n                        specify which file to store the built model.\n  -a ALGORITHM, --algorithm=ALGORITHM\n                        specify which algorithm to use for classfication,\n                        candidates are svm/knn/rbf/rf/gnb/benchmark, rbf means\n                        svm using rbf kernel, rf means random forest, gnb\n                        means Gaussian Naive Bayes, benchmark will try every\n                        algorithm and plot the score figure, default is knn.\n  -c CFDNA_FLAG, --cfdna_flag=CFDNA_FLAG\n                        specify the filename flag of cfdna files, separated by\n                        semicolon. default is: cfdna\n  -o OTHER_FLAG, --other_flag=OTHER_FLAG\n                        specify the filename flag of other files, separated by\n                        semicolon. default is: gdna;ffpe\n  -p PASSES, --passes=PASSES\n                        specify how many passes to do training and validating,\n                        default is 10.\n  -n, --no_cache_check  if the cache file exists, use it without checking the\n                        identity with input files\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopengene%2Fcfdnapattern","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopengene%2Fcfdnapattern","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopengene%2Fcfdnapattern/lists"}