SBIMB / StellarPGx

Calling star alleles in highly polymorphic pharmacogenes (e.g. CYP450 genes) by leveraging genome graph-based variant detection.
MIT License
30 stars 6 forks source link

How to run StellarPGX on all CYP genes at once #17

Closed Shubhamverma-bioinfo closed 2 years ago

Shubhamverma-bioinfo commented 2 years ago

@twesigomwedavid I have did all the necessary changes required in nextflow.config to run the stellarPGx with input bam and ref fasta. It is running fine when we are giving single genes but I want to run the all genes at once, i.e what i have added this line in nextflow.config file gene = "cyp2a6,cyp2b6,cyp2c19,cyp2c9,cyp2c8,cyp3a4,cyp3a5,cyp1a1,cyp1a2,cyp2e1,cyp4f2", then i run $nextflow run main.nf -dsl1 -profile standard getting error Error executing process > 'call_sv_dup (1)'

Caused by: No such variable: region_a1 -- Check script 'main.nf' at line: 473

Source block: ext1 = bam[0].getExtension() if (ext1=='bam') sam_ind='bam.bai'

  else if (ext1=='cram')
      sam_ind='cram.crai'

  else if (ext1=='crai')
      sam_ind='crai'

  else 
      sam_ind='bai'

""" graphtyper genotype_sv ${ref_dir}/${ref_genome} --sam=${name}.${ext} --region=${region_a1} --output=${name}_sv_dup ${res_dir}/sv_test3.vcf.gz

twesigomwedavid commented 2 years ago

@Shubhamverma-bioinfo,

Thanks for raising this.

Running StellarPGx on all genes at once would certainly have its advantages. However, given the fact that some genes such as CYP2D6, CYP2B6, and CYP2A6 are more challenging than others, the advantages of analysing each gene separately are superior.

That being said, we could look into having the pipeline run for one gene after another based on the arguments for the --gene parameter. At the moment, the simple fix would be to incorporate this into an sbatch/bash script and loop through the different gene names.

Shubhamverma-bioinfo commented 2 years ago

Thank you for your information @twesigomwedavid