0
$\begingroup$

I have started using snakemake 6.5.2 to align fastq files with reference file. I have pasted the error below in this question. How to allocate memory in the snakefile and read the header from samfile, '-'. This is the snakefile (wrapper for running alignment):

 rule bwa_mem2_mem:
        input:
            reads=["/scicore/home/cichon/GROUP/test_workflow/samples/{sample}.1.fq", "/scicore/home/cichon/GROUP/test_workflow/samples/{sample}.2.fq"]
        output:
            "/scicore/home/cichon/GROUP/test_workflow/output/{sample}.bam"
        log:
            "/scicore/home/cichon/GROUP/test_workflow/output/{sample}.log"
        params:
            index="/scicore/home/cichon/GROUP/test_workflow/data/gch38.fa",
            extra=r"-R '@RG\tID:{sample}\tSM:{sample}'",
            sort="none",             # Can be 'none', 'samtools' or 'picard'.
            sort_order="coordinate", # Can be 'coordinate' (default) or 'queryname'.
            sort_extra=""     

        threads: 8
        wrapper:
            "0.77.0/bio/bwa-mem2/mem"

I used this command to execute the above snakemake file:

snakemake --use-conda --snakefile Snakefile --cores -p /scicore/home/cichon/GROUP/test_workflow/output/DE98NGSUKBD117612_1.bam /scicore/home/cichon/GROUP/test_workflow/output/DE71NGSUKBD117613_3.bam

Error from log file:

Looking to launch executable "/scicore/home/cichon/GROUP/test_workflow/.snakemake/conda/0ecf6ba401c70d7501c73bb1c733a060/bin/bwa-mem2.avx", simd = .avx
Launching executable "/scicore/home/cichon/GROUP/test_workflow/.snakemake/conda/0ecf6ba401c70d7501c73bb1c733a060/bin/bwa-mem2.avx"
-----------------------------
Executing in AVX mode!!
-----------------------------
* SA compression enabled with xfactor: 8
* Ref file: /scicore/home/cichon/GROUP/test_workflow/data/gch38.fa
* Entering FMI_search
* Index file found. Loading index from /scicore/home/cichon/GROUP/test_workflow/data/gch38.fa.bwt.2bit.64
* Reference seq len for bi-index = 6544178411
* sentinel-index: 2782712944
* Count:
0,  1
1,  1914743810
2,  3272089206
3,  4629434602
4,  6544178411

* Reading other elements of the index from files /scicore/home/cichon/GROUP/test_workflow/data/gch38.fa
* Index prefix: /scicore/home/cichon/GROUP/test_workflow/data/gch38.fa
* Read 0 ALT contigs
[fread] Cannot allocate memory
[main_samview] fail to read the header from "-".

Thanks

Priya

$\endgroup$
5
  • 1
    $\begingroup$ You could at least reference the biostars thread: biostars.org/p/9486284 It is the same problem. Did you upgrade your snakemake and apply the suggestions? Voting to close this here to keep it focused in a single thread. $\endgroup$
    – user3051
    Commented Aug 25, 2021 at 12:54
  • 2
    $\begingroup$ I’m voting to close this question because it is already being discussed at biostars extensively. $\endgroup$
    – user3051
    Commented Aug 25, 2021 at 12:55
  • $\begingroup$ Please don't close the question. I am the one posted the question in Biostars as I didn't get a clear answer, I have posted it here again . Thanks $\endgroup$
    – Atom
    Commented Aug 25, 2021 at 12:57
  • 1
    $\begingroup$ Did you follow the suggestions? If so please add comment and follow up rather than starting from scratch here. $\endgroup$
    – user3051
    Commented Aug 25, 2021 at 13:25
  • $\begingroup$ Clearly, this seems a problem with memory allocation. You should tell us what you tried from the suggestions of Biostars so we can help you in your problem. $\endgroup$
    – user324810
    Commented Aug 26, 2021 at 12:10

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.