Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: account for memory overhead #2648

Merged
merged 3 commits into from Feb 22, 2024
Merged

Conversation

fgvieira
Copy link
Collaborator

According to the manual, -m specifies the approximated maximum required memory per thread.
In some cases, samtools sort can use more memory than specified (e.g. samtools/samtools#831) so we account for some overhead.

QC

  • I confirm that:

For all wrappers added by this PR,

  • there is a test case which covers any introduced changes,
  • input: and output: file paths in the resulting rule can be changed arbitrarily,
  • either the wrapper can only use a single core, or the example rule contains a threads: x statement with x being a reasonable default,
  • rule names in the test case are in snake_case and somehow tell what the rule is about or match the tools purpose or name (e.g., map_reads for a step that maps reads),
  • all environment.yaml specifications follow the respective best practices,
  • the environment.yaml pinning has been updated by running snakedeploy pin-conda-envs environment.yaml on a linux machine,
  • wherever possible, command line arguments are inferred and set automatically (e.g. based on file extensions in input: or output:),
  • all fields of the example rules in the Snakefiles and their entries are explained via comments (input:/output:/params: etc.),
  • stderr and/or stdout are logged correctly (log:), depending on the wrapped tool,
  • temporary files are either written to a unique hidden folder in the working directory, or (better) stored where the Python function tempfile.gettempdir() points to (see here; this also means that using any Python tempfile default behavior works),
  • the meta.yaml contains a link to the documentation of the respective tool or command,
  • Snakefiles pass the linting (snakemake --lint),
  • Snakefiles are formatted with snakefmt,
  • Python wrapper scripts are formatted with black.
  • Conda environments use a minimal amount of channels, in recommended ordering. E.g. for bioconda, use (conda-forge, bioconda, nodefaults, as conda-forge should have highest priority and defaults channels are usually not needed because most packages are in conda-forge nowadays).

Copy link
Contributor

@dlaehnemann dlaehnemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch and clean fix, with proper linkout. Many thanks.

@fgvieira fgvieira merged commit 6a05aad into snakemake:master Feb 22, 2024
6 checks passed
@fgvieira fgvieira deleted the samtools_mem branch February 22, 2024 14:13
johanneskoester pushed a commit that referenced this pull request Feb 27, 2024
🤖 I have created a release \*beep\* \*boop\*
---
###
[3.3.7](https://www.github.com/snakemake/snakemake-wrappers/compare/v3.3.6...v3.3.7)
(2024-02-27)


### Bug Fixes

* account for memory overhead
([#2648](https://www.github.com/snakemake/snakemake-wrappers/issues/2648))
([6a05aad](https://www.github.com/snakemake/snakemake-wrappers/commit/6a05aad6066b0f3aadb92e1f7f931c161222b150))


### Performance Improvements

* autobump bio/bbtools
([#2627](https://www.github.com/snakemake/snakemake-wrappers/issues/2627))
([7f5b520](https://www.github.com/snakemake/snakemake-wrappers/commit/7f5b5209923401ec20fd1a08063821767300b40a))
* autobump bio/diamond/blastp
([#2630](https://www.github.com/snakemake/snakemake-wrappers/issues/2630))
([3911776](https://www.github.com/snakemake/snakemake-wrappers/commit/39117768d8978f51fade713abf843d970f98c623))
* autobump bio/diamond/blastx
([#2629](https://www.github.com/snakemake/snakemake-wrappers/issues/2629))
([faf5de8](https://www.github.com/snakemake/snakemake-wrappers/commit/faf5de8da5579e97620f668b6f6ac63dc57cc0b4))
* autobump bio/diamond/makedb
([#2628](https://www.github.com/snakemake/snakemake-wrappers/issues/2628))
([7ddca67](https://www.github.com/snakemake/snakemake-wrappers/commit/7ddca679c07cc79598f4099ba0f17d3f10a4247f))
* autobump bio/encode_fastq_downloader
([#2682](https://www.github.com/snakemake/snakemake-wrappers/issues/2682))
([eb4a093](https://www.github.com/snakemake/snakemake-wrappers/commit/eb4a0939a1c6de100d1c1689d8cbb32402c8d328))
* autobump bio/fgbio/collectduplexseqmetrics
([#2631](https://www.github.com/snakemake/snakemake-wrappers/issues/2631))
([7a58ee9](https://www.github.com/snakemake/snakemake-wrappers/commit/7a58ee99d23d1f75024bf2e12cb82c3e99bdeefc))
* autobump bio/galah
([#2670](https://www.github.com/snakemake/snakemake-wrappers/issues/2670))
([8972be1](https://www.github.com/snakemake/snakemake-wrappers/commit/8972be1d8625cd2a359088fb41bdec0945030a9e))
* autobump bio/gatk/applybqsr
([#2662](https://www.github.com/snakemake/snakemake-wrappers/issues/2662))
([2d1ff8e](https://www.github.com/snakemake/snakemake-wrappers/commit/2d1ff8eeb36fd82f33e03149f2205cc795993f85))
* autobump bio/gatk/applybqsrspark
([#2669](https://www.github.com/snakemake/snakemake-wrappers/issues/2669))
([46a8acd](https://www.github.com/snakemake/snakemake-wrappers/commit/46a8acdff97cef5ff1e064ccedac90ba05659bb6))
* autobump bio/gatk/baserecalibratorspark
([#2651](https://www.github.com/snakemake/snakemake-wrappers/issues/2651))
([3b4f517](https://www.github.com/snakemake/snakemake-wrappers/commit/3b4f51740d2a5b371789385fbd0ffe307af100f5))
* autobump bio/gatk/calculatecontamination
([#2673](https://www.github.com/snakemake/snakemake-wrappers/issues/2673))
([056c9a0](https://www.github.com/snakemake/snakemake-wrappers/commit/056c9a0cb2f9198a700c1972d0ab7879a7178cdf))
* autobump bio/gatk/callcopyratiosegments
([#2655](https://www.github.com/snakemake/snakemake-wrappers/issues/2655))
([b1932ae](https://www.github.com/snakemake/snakemake-wrappers/commit/b1932ae110fd9e52b7a4c782ed72c98636a84fc0))
* autobump bio/gatk/cleansam
([#2660](https://www.github.com/snakemake/snakemake-wrappers/issues/2660))
([3802099](https://www.github.com/snakemake/snakemake-wrappers/commit/3802099d38708052cef5284bb3ec93d64e362f58))
* autobump bio/gatk/collectreadcounts
([#2666](https://www.github.com/snakemake/snakemake-wrappers/issues/2666))
([0aa2cce](https://www.github.com/snakemake/snakemake-wrappers/commit/0aa2ccee2a6b763dc4fe83da11ed9827276b34a5))
* autobump bio/gatk/combinegvcfs
([#2686](https://www.github.com/snakemake/snakemake-wrappers/issues/2686))
([a903745](https://www.github.com/snakemake/snakemake-wrappers/commit/a903745748b38685cfa5c6381abdcfbfce80803e))
* autobump bio/gatk/denoisereadcounts
([#2685](https://www.github.com/snakemake/snakemake-wrappers/issues/2685))
([1e8498b](https://www.github.com/snakemake/snakemake-wrappers/commit/1e8498b5c7771ea2f7c360abeb640e6caa665db4))
* autobump bio/gatk/depthofcoverage
([#2658](https://www.github.com/snakemake/snakemake-wrappers/issues/2658))
([1f43492](https://www.github.com/snakemake/snakemake-wrappers/commit/1f434923e7d4c0cc2905b3f6f17e1735577e8631))
* autobump bio/gatk/estimatelibrarycomplexity
([#2650](https://www.github.com/snakemake/snakemake-wrappers/issues/2650))
([e9395ff](https://www.github.com/snakemake/snakemake-wrappers/commit/e9395ff31acaa58506258905f62582f9db0a55c0))
* autobump bio/gatk/filtermutectcalls
([#2684](https://www.github.com/snakemake/snakemake-wrappers/issues/2684))
([b239e62](https://www.github.com/snakemake/snakemake-wrappers/commit/b239e62c5d0d67b138d9af77d8318db9e62dd9af))
* autobump bio/gatk/genomicsdbimport
([#2665](https://www.github.com/snakemake/snakemake-wrappers/issues/2665))
([a38b278](https://www.github.com/snakemake/snakemake-wrappers/commit/a38b278adbb28857b59d25c0acca53daf6e2478f))
* autobump bio/gatk/getpileupsummaries
([#2657](https://www.github.com/snakemake/snakemake-wrappers/issues/2657))
([7523193](https://www.github.com/snakemake/snakemake-wrappers/commit/75231932739bd97c39814a4b819c119288b6bddb))
* autobump bio/gatk/learnreadorientationmodel
([#2653](https://www.github.com/snakemake/snakemake-wrappers/issues/2653))
([773e78c](https://www.github.com/snakemake/snakemake-wrappers/commit/773e78c49e9c4f70291f2a98d99852fe347bc244))
* autobump bio/gatk/leftalignandtrimvariants
([#2656](https://www.github.com/snakemake/snakemake-wrappers/issues/2656))
([183950c](https://www.github.com/snakemake/snakemake-wrappers/commit/183950c6424d223915bca50deba31d5c3423d385))
* autobump bio/gatk/markduplicatesspark
([#2659](https://www.github.com/snakemake/snakemake-wrappers/issues/2659))
([706cda3](https://www.github.com/snakemake/snakemake-wrappers/commit/706cda3432a12b4a7379edc4f146b2d29919535a))
* autobump bio/gatk/modelsegments
([#2663](https://www.github.com/snakemake/snakemake-wrappers/issues/2663))
([bc40698](https://www.github.com/snakemake/snakemake-wrappers/commit/bc40698b6a902012a6a1e197eccfd58ec40d7910))
* autobump bio/gatk/mutect
([#2661](https://www.github.com/snakemake/snakemake-wrappers/issues/2661))
([0e1d98a](https://www.github.com/snakemake/snakemake-wrappers/commit/0e1d98a96fe448279f38e31b871acf2abf5ca47e))
* autobump bio/gatk/scatterintervalsbyns
([#2674](https://www.github.com/snakemake/snakemake-wrappers/issues/2674))
([e49b027](https://www.github.com/snakemake/snakemake-wrappers/commit/e49b0273bce205a3597ac2709e599c1ce1f18317))
* autobump bio/gatk/splitintervals
([#2667](https://www.github.com/snakemake/snakemake-wrappers/issues/2667))
([332eed5](https://www.github.com/snakemake/snakemake-wrappers/commit/332eed549c82ef34d150da68e6af5dfd534ae467))
* autobump bio/gatk/splitncigarreads
([#2672](https://www.github.com/snakemake/snakemake-wrappers/issues/2672))
([dabbc1e](https://www.github.com/snakemake/snakemake-wrappers/commit/dabbc1eec0f5805664a83d08f603a0dcd91407da))
* autobump bio/gatk/variantannotator
([#2664](https://www.github.com/snakemake/snakemake-wrappers/issues/2664))
([2142589](https://www.github.com/snakemake/snakemake-wrappers/commit/21425891baf75967a8d6c1bb373168ce4e4bec4d))
* autobump bio/gatk/varianteval
([#2654](https://www.github.com/snakemake/snakemake-wrappers/issues/2654))
([9d4ffea](https://www.github.com/snakemake/snakemake-wrappers/commit/9d4ffea301af15a5829d4f04b649431139475bc8))
* autobump bio/gatk/variantfiltration
([#2668](https://www.github.com/snakemake/snakemake-wrappers/issues/2668))
([5cf5407](https://www.github.com/snakemake/snakemake-wrappers/commit/5cf54078192852b3de6f853c0a5fff0176dfbae0))
* autobump bio/gatk/variantrecalibrator
([#2652](https://www.github.com/snakemake/snakemake-wrappers/issues/2652))
([714ae91](https://www.github.com/snakemake/snakemake-wrappers/commit/714ae9130a7ae352443371cab90adc8817ee208c))
* autobump bio/gatk3/printreads
([#2683](https://www.github.com/snakemake/snakemake-wrappers/issues/2683))
([c15b388](https://www.github.com/snakemake/snakemake-wrappers/commit/c15b3882c12d94a9b5a755dd851e94bbc65eca8f))
* autobump bio/gatk3/realignertargetcreator
([#2671](https://www.github.com/snakemake/snakemake-wrappers/issues/2671))
([103425a](https://www.github.com/snakemake/snakemake-wrappers/commit/103425a18f9d4f194aa1794803faf5796e95fa54))
* autobump bio/igv-reports
([#2641](https://www.github.com/snakemake/snakemake-wrappers/issues/2641))
([4bac92e](https://www.github.com/snakemake/snakemake-wrappers/commit/4bac92e374d7a5f977a67cfab0c92f1372e47be1))
* autobump bio/infernal/cmpress
([#2676](https://www.github.com/snakemake/snakemake-wrappers/issues/2676))
([7e690c7](https://www.github.com/snakemake/snakemake-wrappers/commit/7e690c742c330d8ff195e920f9caf1643bbe1740))
* autobump bio/infernal/cmscan
([#2675](https://www.github.com/snakemake/snakemake-wrappers/issues/2675))
([89eac39](https://www.github.com/snakemake/snakemake-wrappers/commit/89eac394bf1c2c183f21e734180398cc902b2455))
* autobump bio/jellyfish/count
([#2643](https://www.github.com/snakemake/snakemake-wrappers/issues/2643))
([68d8bd6](https://www.github.com/snakemake/snakemake-wrappers/commit/68d8bd6d4c2900a872345a99bbb7c27fc3947fee))
* autobump bio/jellyfish/dump
([#2645](https://www.github.com/snakemake/snakemake-wrappers/issues/2645))
([d3823f8](https://www.github.com/snakemake/snakemake-wrappers/commit/d3823f8b76565881aa3c451d9a781137538196e3))
* autobump bio/jellyfish/histo
([#2642](https://www.github.com/snakemake/snakemake-wrappers/issues/2642))
([26c3123](https://www.github.com/snakemake/snakemake-wrappers/commit/26c3123627886f23160c55ac2555b186032cd2cf))
* autobump bio/jellyfish/merge
([#2644](https://www.github.com/snakemake/snakemake-wrappers/issues/2644))
([2acb46b](https://www.github.com/snakemake/snakemake-wrappers/commit/2acb46b008bd2feaebda5c7d3952cf80e66fbc87))
* autobump bio/last/lastal
([#2632](https://www.github.com/snakemake/snakemake-wrappers/issues/2632))
([0090d1a](https://www.github.com/snakemake/snakemake-wrappers/commit/0090d1a294c8b56738a9377ce420ebea27fab10c))
* autobump bio/last/lastal
([#2646](https://www.github.com/snakemake/snakemake-wrappers/issues/2646))
([aecf702](https://www.github.com/snakemake/snakemake-wrappers/commit/aecf702f448f8bf449263d20d91518066af7ac69))
* autobump bio/last/lastal
([#2687](https://www.github.com/snakemake/snakemake-wrappers/issues/2687))
([c252386](https://www.github.com/snakemake/snakemake-wrappers/commit/c25238635182b24f6e4c7fa09e0d8543fa5cb703))
* autobump bio/last/lastdb
([#2633](https://www.github.com/snakemake/snakemake-wrappers/issues/2633))
([0adfac7](https://www.github.com/snakemake/snakemake-wrappers/commit/0adfac781ccf609b15bb4301a8597d52504d5049))
* autobump bio/last/lastdb
([#2647](https://www.github.com/snakemake/snakemake-wrappers/issues/2647))
([9797636](https://www.github.com/snakemake/snakemake-wrappers/commit/979763663965ff14a19b8ae41dd744d6687c0dab))
* autobump bio/last/lastdb
([#2688](https://www.github.com/snakemake/snakemake-wrappers/issues/2688))
([3dec479](https://www.github.com/snakemake/snakemake-wrappers/commit/3dec47921eee6532b0c94ba976c078dd61aae48d))
* autobump bio/multiqc
([#2677](https://www.github.com/snakemake/snakemake-wrappers/issues/2677))
([197ef10](https://www.github.com/snakemake/snakemake-wrappers/commit/197ef1075a0c3676a0f3482c2b056e35cc8b7faa))
* autobump bio/seqkit
([#2635](https://www.github.com/snakemake/snakemake-wrappers/issues/2635))
([8ed8105](https://www.github.com/snakemake/snakemake-wrappers/commit/8ed810512db5c7c76348993317320755d500ebe9))
* autobump bio/sourmash/compute
([#2678](https://www.github.com/snakemake/snakemake-wrappers/issues/2678))
([1ba1a52](https://www.github.com/snakemake/snakemake-wrappers/commit/1ba1a52ebe2a3041178ba5ee93d6b1e0c8ce3d0c))
* autobump bio/spades/metaspades
([#2689](https://www.github.com/snakemake/snakemake-wrappers/issues/2689))
([35e4c20](https://www.github.com/snakemake/snakemake-wrappers/commit/35e4c20760c9ae51fb46c2041178794d78965fe5))
* autobump bio/star/align
([#2634](https://www.github.com/snakemake/snakemake-wrappers/issues/2634))
([0cb085a](https://www.github.com/snakemake/snakemake-wrappers/commit/0cb085a0fa6fd8466f0305350190464c8256850d))
* autobump bio/star/index
([#2636](https://www.github.com/snakemake/snakemake-wrappers/issues/2636))
([e8df2fe](https://www.github.com/snakemake/snakemake-wrappers/commit/e8df2fe9cab9dc52575f771f170f0bdc0827aae0))
* autobump bio/ucsc/gtfToGenePred
([#2679](https://www.github.com/snakemake/snakemake-wrappers/issues/2679))
([20682f2](https://www.github.com/snakemake/snakemake-wrappers/commit/20682f297038923eda28d5fb08388dbb555298ec))
* autobump bio/vep/cache
([#2690](https://www.github.com/snakemake/snakemake-wrappers/issues/2690))
([0ea80f3](https://www.github.com/snakemake/snakemake-wrappers/commit/0ea80f342544af0552d99f6eb184eaab4314bc35))
* autobump bio/vep/plugins
([#2691](https://www.github.com/snakemake/snakemake-wrappers/issues/2691))
([1b0108f](https://www.github.com/snakemake/snakemake-wrappers/commit/1b0108f96b23f50dae124c03b4b6b18e69163a4f))
* autobump bio/whatshap/haplotag
([#2637](https://www.github.com/snakemake/snakemake-wrappers/issues/2637))
([5705ffc](https://www.github.com/snakemake/snakemake-wrappers/commit/5705ffc957a8d307c42920608d2a0f1e388a24ce))
* Update datavzrd to v2.36.1
([#2692](https://www.github.com/snakemake/snakemake-wrappers/issues/2692))
([cba4946](https://www.github.com/snakemake/snakemake-wrappers/commit/cba4946c8bef80ed3633f5b4a67a46ecee21a389))
---


This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants