epi2me-labs / wf-human-variation

Other
86 stars 41 forks source link

Issue with genome build detection #193

Open Machadum opened 1 week ago

Machadum commented 1 week ago

Operating System

macOS

Other Linux

No response

Workflow Version

24.04.2

Workflow Execution

Command line (Local)

Other workflow execution

No response

EPI2ME Version

No response

CLI command run

nextflow run epi2me-labs/wf-human-variation \
--bam "/Volumes/Janet/bam_merged/20230808_pilot_pass.sorted.bam" \
--ref "/Volumes/Rita/Ext.datasets/References/GCA_000001405.14/ncbi_dataset/data/GCA_000001405.14/GCA_000001405.14_GRCh37.p13_genomic.fna" \
--sample_name "before7" \
--sv \
-profile standard

Workflow Execution - CLI Execution Profile

standard (default)

What happened?

I do not know why I am getting this error. The bam is in hg19. I am a newbie with Nextflow, will you be please able to help me with this?

ERROR ~ Error executing process > 'getGenome (1)'

Caused by:
  Process `getGenome (1)` terminated with an error exit status (65)
Command executed:

  # use view -H rather than idxstats, as idxstats will still cause a scan of the whole CRAM (https://github.com/samtools/samtools/issues/303)
  samtools view -H reads.bam --no-PG | grep '^@SQ' | sed -nE 's,.*SN:([^[:space:]]*).*LN:([^[:space:]]*).*,\1\t\2,p' > reads.bam_genome.txt
  get_genome.py --chr_counts reads.bam_genome.txt -o output.txt   
  genome_build=`cat output.txt`

Command exit status:
  65

Command output:
  (empty)

Command error:
  The genome build detected in the BAM is not compatible with this workflow.

Work dir:
  /Users/mildrude/anaconda3/envs/nextflow/work/15/7a4c2f93ddbe57315e1c6b2603f880

Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh`

 -- Check '.nextflow.log' file for details

Relevant log output

N E X T F L O W   ~  version 24.04.2

Launching `https://github.com/epi2me-labs/wf-human-variation` [elated_elion] DSL2 - revision: e5055ed43c [master]

||||||||||   _____ ____ ___ ____  __  __ _____      _       _
||||||||||  | ____|  _ \_ _|___ \|  \/  | ____|    | | __ _| |__  ___
|||||       |  _| | |_) | |  __) | |\/| |  _| _____| |/ _` | '_ \/ __|
|||||       | |___|  __/| | / __/| |  | | |__|_____| | (_| | |_) \__ \
||||||||||  |_____|_|  |___|_____|_|  |_|_____|    |_|\__,_|_.__/|___/
||||||||||  wf-human-variation v2.2.1-ge5055ed
--------------------------------------------------------------------------------
Core Nextflow options
  revision       : master
  runName        : elated_elion
  containerEngine: docker
  container      : [withLabel:wf_human_snp:ontresearch/wf-human-variation-snp:sha6d5c80963ce346695d98205563c87dc71fc182ff, withLabel:wf_human_sv:ontresearch/wf-human-variation-sv:sha8f02fbfaea233fe4763f7c7142696efcadab2f4d, withLabel:wf_human_mod:ontresearch/modkit:sha0253e9e9ba92aacc852ba376edefe8ff0932f71a, withLabel:wf_cnv:ontresearch/wf-cnv:sha428cb19e51370020ccf29ec2af4eead44c6a17c2, withLabel:wf_human_str:ontresearch/wf-human-variation-str:shaa2f49ce57886426516eadd4048b6fdf9c22c7437, withLabel:snpeff_annotation:ontresearch/snpeff:sha313729d816872d70b410752001a0e2654eb88807, withLabel:wf_common:ontresearch/wf-common:sha338caea0a2532dc0ea8f46638ccc322bb8f9af48, withLabel:spectre:ontresearch/spectre:sha15d6757d00b503344d0b1054473ffeb5e3cab79d, default:ontresearch/wf-human-variation:sha2b856c1f358ddf1576217a336bc0e9864b6dc0ed]
  launchDir      : /Users/mildrude/anaconda3/envs/nextflow
  workDir        : /Users/mildrude/anaconda3/envs/nextflow/work
  projectDir     : /Users/mildrude/.nextflow/assets/epi2me-labs/wf-human-variation
  userName       : mildrude
  profile        : standard
  configFiles    : /Users/mildrude/.nextflow/assets/epi2me-labs/wf-human-variation/nextflow.config

Workflow Options
  sv             : true

Main options
  sample_name    : before7
  bam            : /Volumes/Janet/bam_merged/20230808_pilot_pass.sorted.bam
  ref            : /Volumes/Rita/Ext.datasets/References/GCA_000001405.14/ncbi_dataset/data/GCA_000001405.14/GCA_000001405.14_GRCh37.p13_genomic.fna

!! Only displaying parameters that differ from the pipeline defaults !!
--------------------------------------------------------------------------------
If you use epi2me-labs/wf-human-variation for your analysis please cite:

* The nf-core framework
  https://doi.org/10.1038/s41587-020-0439-x

--------------------------------------------------------------------------------
This is epi2me-labs/wf-human-variation v2.2.1-ge5055ed.
--------------------------------------------------------------------------------
Searching input for [.bam, .ubam] files.
executor >  local (9)
[ef/e50003] process > ingress:checkBamHeaders (1)     [100%] 1 of 1 ✔
executor >  local (9)
[ef/e50003] process > ingress:checkBamHeaders (1)     [100%] 1 of 1 ✔
[-        ] process > ingress:sortBam                 -
[-        ] process > ingress:mergeBams               -
[-        ] process > ingress:catSortBams             -
[42/2b4296] process > ingress:validateIndex (1)       [100%] 1 of 1 ✔
[-        ] process > ingress:samtools_index          -
[39/1ba071] process > ingress:check_for_alignment (1) [100%] 1 of 1 ✔
[-        ] process > ingress:minimap2_alignment      -
[15/7a4c2f] process > getGenome (1)                   [100%] 1 of 1, failed: 1 ✘
[-        ] process > cram_cache (1)                  -
[-        ] process > haplocheck                      -
[-        ] process > getAllChromosomesBed            -
[-        ] process > mosdepth_input                  -
[be/526b56] process > getVersions                     [100%] 1 of 1 ✔
[36/7daebb] process > getParams                       [100%] 1 of 1 ✔
[-        ] process > readStats                       -
[-        ] process > infer_sex                       -
[-        ] process > makeAlignmentReport             -
[-        ] process > failedQCReport                  -
[-        ] process > sv:variantCall:sniffles2        -
[-        ] process > sv:variantCall:filterCalls      -
[-        ] process > sv:variantCall:sortVCF          -
[-        ] process > sv:annotate_sv_vcf              -
[a2/a4da43] process > sv:runReport:getVersions        [100%] 1 of 1 ✔
[9d/3893ab] process > sv:runReport:getParams          [100%] 1 of 1 ✔
[-        ] process > sv:runReport:report             -
[-        ] process > output_sv                       [  0%] 0 of 1
[-        ] process > configure_jbrowse               -
[-        ] process > combine_metrics_json            -
[-        ] process > publish_artifact                -
WARN: Inferring genetic sex of sample as params.sex was not provided.
ERROR ~ Error executing process > 'getGenome (1)'

Caused by:
  Process `getGenome (1)` terminated with an error exit status (65)

Command executed:

  # use view -H rather than idxstats, as idxstats will still cause a scan of the whole CRAM (https://github.com/samtools/samtools/issues/303)
  samtools view -H reads.bam --no-PG | grep '^@SQ' | sed -nE 's,.*SN:([^[:space:]]*).*LN:([^[:space:]]*).*,\1\t\2,p' > reads.bam_genome.txt
  get_genome.py --chr_counts reads.bam_genome.txt -o output.txt   
  genome_build=`cat output.txt`

Command exit status:
  65

Command output:
  (empty)

Command error:
  The genome build detected in the BAM is not compatible with this workflow.

Work dir:
  /Users/mildrude/anaconda3/envs/nextflow/work/15/7a4c2f93ddbe57315e1c6b2603f880

Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh`

 -- Check '.nextflow.log' file for details

Application activity log entry

No response

Were you able to successfully run the latest version of the workflow with the demo data?

yes

Other demo data information

No response

vlshesketh commented 3 days ago

Hi @Machadum thank you for your interest in the workflow, and apologies for the late reply. The message you've seen is due to the version of the human genome reference you are using. Please can you try again with one of the recommended references as described the README?

vlshesketh commented 3 days ago

Apologies - issue closed by mistake! If you didn't align the BAM using a recommended reference FASTA, the workflow will take care of the re-alignment for you.