{"id":19962018,"url":"https://github.com/stracquadaniolab/cubseq-nf","last_synced_at":"2026-02-20T18:02:04.205Z","repository":{"id":191860807,"uuid":"685025961","full_name":"stracquadaniolab/cubseq-nf","owner":"stracquadaniolab","description":"CUBseq analyses codon usage bias from RNA-seq data, producing robust CUB estimates that account for variants transcriptome-wide and in highly expressed genes.","archived":false,"fork":false,"pushed_at":"2024-03-29T16:49:41.000Z","size":196376,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-28T23:52:01.586Z","etag":null,"topics":["codon-bias","codon-optimization","codon-usage","nextflow","rnaseq","transcriptomics"],"latest_commit_sha":null,"homepage":"","language":"R","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/stracquadaniolab.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","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":"2023-08-30T11:02:49.000Z","updated_at":"2025-08-27T17:54:41.000Z","dependencies_parsed_at":"2024-03-29T17:46:26.822Z","dependency_job_id":"be329ec6-3cf2-4629-9948-f364bc8da7b0","html_url":"https://github.com/stracquadaniolab/cubseq-nf","commit_stats":{"total_commits":28,"total_committers":2,"mean_commits":14.0,"dds":0.1785714285714286,"last_synced_commit":"5139208278c83be483eebd328186b03292e0abf9"},"previous_names":["stracquadaniolab/cubseq-nf"],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/stracquadaniolab/cubseq-nf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stracquadaniolab%2Fcubseq-nf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stracquadaniolab%2Fcubseq-nf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stracquadaniolab%2Fcubseq-nf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stracquadaniolab%2Fcubseq-nf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stracquadaniolab","download_url":"https://codeload.github.com/stracquadaniolab/cubseq-nf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stracquadaniolab%2Fcubseq-nf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29659752,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T16:33:43.953Z","status":"ssl_error","status_checked_at":"2026-02-20T16:33:43.598Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["codon-bias","codon-optimization","codon-usage","nextflow","rnaseq","transcriptomics"],"created_at":"2024-11-13T02:09:13.217Z","updated_at":"2026-02-20T18:02:04.177Z","avatar_url":"https://github.com/stracquadaniolab.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cubseq-nf\n\n![](https://img.shields.io/badge/current_version-1.3.2-blue)\n![](https://github.com/stracquadaniolab/cubseq-nf/workflows/build/badge.svg)\n\n## What is CUBseq?\nCodon Usage Bias from RNA-sequencing data (CUBseq) is a fully automatic \npipeline that produces robust estimates of codon usage frequencies at \nthe transcriptome level. CUBseq can be used for any organism with an \nNCBI taxonomy ID, available RNA-sequencing data and a reference \ngenome/annotation. The end result is a dataset of transcriptome-wide \nsequences with variants built in, allowing CUBseq to provide codon \nrelative frequencies as well as raw counts at codon and amino acid \nresolution for custom downstream codon usage analysis.\n\n### What can CUBseq be used for?\n- Large-scale transcriptome-wide codon usage analysis.\n- Generation of transcriptome-derived codon usage tables (expressed as \nrelative frequency and frequency per thousand).\n- Quantification of transcriptome-wide genes.\n- Robust identification of high expression genes.\n- Reconstruction of transcriptomes per sample using variant calls.\n- Analysis of mutation frequency per sample across the transcriptome \nand at gene level.\n- Comparison of codon frequency with tRNA abundance.\n\n![schematic-overview-of-cubseq](cubseq-schematic.png)\n\n## Running CUBseq: quick-guide\n\n\u003e [!NOTE] \n\u003e Before running the workflow, you will need to have Nextflow \ninstalled. See instructions on how to [here](https://www.nextflow.io/docs/latest/getstarted.html#installation).\n\n\n### Install or update the workflow\n\n```bash\nnextflow pull stracquadaniolab/cubseq-nf -r main\n```\n\n### Define the configuration file\nA `nextflow.config` configuration file will need to be created where parameters are defined, as specified below in `Configuring CUBseq`. This configuration file will need to be created in the same directory where the pipeline will be run. An example configuration file is provided in [example-nextflow.config](templatefiles/example-nextflow.config).\n\n### Run the analysis\n\nAssuming the configuration file is set, to run CUBseq, the bare minimum command required is:\n```bash\nnextflow run stracquadaniolab/cubseq-nf -r main -profile singularity -c conf/nextflow.config\n```\n\nAlternatively, you can define parameters and call custom profiles (examples available on [example-nextflow.config](templatefiles/example-nextflow.config)) directly in the `nextflow run` command:\n```bash\nnextflow run stracquadaniolab/cubseq-nf -r main -profile singularity,cell -c conf/nextflow.config --resultsDir ./results/test-run\n```\nFor example, here we call a profile, `cell`, which we defined in our config file (which we used to specify the executor, RAM/CPU requirements and error strategy for each process). We also specify a custom results directory path to save output files to.\n\n## Configuring CUBseq\n\nTo run CUBseq you will need to specify a number of paths for storing \nresults, and provide appropriate parameter options based on the \norganism being analysed. These parameters need to be defined in a \nconfiguration file called `nextflow.config`. Required parameters are \nindicated with an asterisk, the rest of the parameters are optional.\n\n| Parameter    | Description |\n| :----------- | :------- |\n| `resultsDir` | Directory where all results are stored [default: `\"./results/\"`]. |\n| Paths to genome files |\n| `genome.reference` * | Path to genome reference (fasta) file [example: `\"data/genome/ecoli.fa\"`]. |\n| `genome.annotation` * | Path to genome annotation (GTF/GFF/GFF3) file [example: `\"data/genome/ecoli.gff\"`]. |\n| ENA metadata retrieval parameters | |\n| `taxonId` * | NCBI taxonomy ID of organism to be analysed [default: `\"562\"`]. |\n| `limitSearch` | Limit number of records output from ENA search query [default: `0`]. |\n| `removeRun` | Remove run by specifying its run accession [default: `\"NULL\"`, example: `\"SRR13894889\"`]. |\n| `max_sra_bytes` | Specify runs to remove if they exceed size of sra_bytes [default: `\"55000000000\"`]. |\n| `dateMin` | Set minimum date (YYYY/MM/DD) to filter runs by (inclusive) [default: `\"1950-01-01\"`]. |\n| `dateMax` | Set maximum date (YYYY/MM/DD) to filter runs by (inclusive), uses current date by default [default: `\"FALSE\"`]. |\n| STAR align parameters | |\n| `star.sjdbOverhang` | The \"--sjdbOverhang\" option of STAR, specifies length of genomic sequence on each side of the junctions, refer to STAR documentation for more detail. Here, we use STAR's default option [default: `\"100\"`]. |\n| `star.genomeSAindexNbases` * | The \"--genomeSAindexNbases\" option of STAR, specifying the length (bases) of SA pre-indexing string. This must be scaled down for small genomes, using formula: min(14, log2(GenomeLength)/2 - 1). [default: `\"10\"`]. |\n| `star.alignIntronMax` | The \"--alignIntronMax\" option of STAR, specifying maximum intron size [default: `\"1\"`.] |\n| `star.limitBAMsortRAM` | The \"--limitBAMsortRAM\" option of STAR, specifying maximum available RAM (bytes) [default: `\"2342750981\"`]. |\n| `star.outBAMsortingBinsN` | The \"--outBAMsortingBinsN\" option of STAR, specifying the number of genome bins for coordinate-sorting [default: `\"50\"`]. |\n| featureCounts parameters | |\n| `featureCounts.type.feature` | The \"-t\" option of featureCounts, specifying feature type(s) in a GTF annotation to be used for read mapping. Multiple types should be separated by \",\" with no space in between [default: `\"exon\"`]. |\n| `featureCounts.type.attribute` | The \"-g\" option of featureCounts, specifying attribute type in the GTF annotation [default\" `\"gene_id\"`]. |\n| Freebayes parameters | |\n| `freebayes.ploidy` * | The \"--ploidy\" option of Freebayes, specifying the default ploidy for the organism used in the analysis. [default: `\"1\"`]. |\n| `freebayes.args` | Additional Freebayes arguments, refer to their documentation [default: \"\"]. |\n| bcftools parameters | |\n| `bcftools.filter_vcf.args` | Additional bcftools filter arguments for filtering the VCF file, refer to their documentation [default: `'QUAL\u003e20 \u0026\u0026 TYPE=\"snp\"'`, note the use of quotation marks here]. |\n| Salmon indexing parameters | |\n| `salmon.index.args` | Additional arguments for salmon indexing, refer to their documentation [default: \"\"]. |\n| Salmon quantification parameters | |\n| `salmon.quant.libtype` | The \"--libType\" option of Salmon quant, specifying library type, CUBseq sets this to \"Automatic\" detection by default. Refer to their documentation for more information [default: `\"A\"`]. |\n| `salmon.quant.args` | Additional arguments for salmon quant, refer to their documentation [example: `\"--writeUnmappedNames\"`]. |\n| tximport parameters | |\n| `summarize_to_gene. counts_from_abundance` | Generate counts from abundances in tximport [default: `\"no\"`]. |\n\n## CUBseq results\n\nCUBseq results are stored in the following directories:\n\n- `results/metadata/metadata.csv`: file containing the ENA metadata of RNA sequencing runs.\n- `results/bams/`: directory containing the bam files, as processed by STAR.\n- `results/featureCounts/` : directory containing featureCounts gene quantification results per sample and summary statistics.\n- `results/freebayes-vcf/` : directory containing vcf files, as processed by Freebayes.\n- `results/vcf/` : directory containing filtered vcf files, as processed by bcftools norm and bcftools filter.\n- `results/transcriptome-consensus/` : directory containing consensus transcriptomes in fasta format.\n- `results/wt-transcriptome/` : directory containing the wild-type transcriptome, as generated by gffread.\n- `results/mut-transcriptome/` : directory containing the reconstructed mutated transcriptomes per sequencing run, as processed by gffread.\n- `results/salmon-quant/` : directory containing gene abundance results per sequencing run, as processed by salmon quantification.\n- `results/dataset/` : directory containing the tximport RDS file that sumamrises salmon quantification results at the gene-level (expressed as TPM matrix).\n- `results/gene-rank-analysis/` : directory containing results of CUBseq's gene rank analysis.\n- `results/heg-mut-transcriptome/` : directory of fasta files per sequencing run, containing only highly expressed genes.\n- `results/protein-mut-transcriptome/` : directory of fasta files per sequencing run, containing transcriptome-wide (i.e. all protein-coding) gemes.\n- `results/cu-data/` : directory containing codon usage count data for highly expressed genes, protein coding genes, as well as from the Kazusa and CoCoPUTs databases (if available).\n- `results/summarise-codon-counts/` : directory containing codon counts summarised at codon and amino acid resolution.\n\n## Authors\n\n- Anima Sutradhar (A.Sutradhar@sms.ed.ac.uk): developer and maintainer.\n- Giovanni Stracquadanio (giovanni.stracquadanio@ed.ac.uk): principal investigator.\n\n## Contact us about CUBseq\nIf you have any questions, issues or feature requests, please get in \ntouch using the emails above or posting an Issue.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstracquadaniolab%2Fcubseq-nf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstracquadaniolab%2Fcubseq-nf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstracquadaniolab%2Fcubseq-nf/lists"}