isugifNF / polishCLR

A nextflow pipeline for polishing CLR assemblies
https://isugifnf.github.io/polishCLR/
16 stars 4 forks source link

reformat: readability #48

Closed j23414 closed 1 year ago

j23414 commented 1 year ago

Description

Cleaning up the code base for readability:

Issues

Reformatting code so it's easier to work toward addressing:

Testing

Test on the HPC, with an example dataset. Maybe something like:

#! /usr/bin/env bash
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=4
#SBATCH --time=24:00:00
#SBATCH --job-name=polishCLR_TEST
#SBATCH --output=R-%x.%J.out
#SBATCH --error=R-%x.%J.err

# == Ceres HPC
module load nextflow
NEXTFLOW=nextflow
# module load merfin

# === Set working directory and in/out variables
cd ${SLURM_SUBMIT_DIR}

# # === Using Conda Environments if singularity doesn't run
# module load miniconda
# source activate /project/ag100pest/conda_envs/polishCLR/

# === Main Program
$NEXTFLOW run isugifNF/polishCLR -r refactor_linebreaks \
  --primary_assembly "/project/ag100pest/Pgos/RawData/3-unzip/all_p_ctg.fasta" \
  --illumina_reads "/project/ag100pest/Illumina_polishing/JAMU*{R1,R2}.fastq.bz2" \
  --pacbio_reads "/project/ag100pest/Pgos/RawData/m54334U_190823_194159.subreads.bam" \
  --k "21" \
  -profile slurm \
  -with-singularity polishCLR.sif
Sivanandan commented 1 year ago

started a test with a slurm script on Ceres HPC:

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=4
#SBATCH --time=24:00:00
#SBATCH --job-name=polishCLR_TEST
#SBATCH --output=R-%x.%J.out
#SBATCH --error=R-%x.%J.err
#SBATCH --mail-user=<email_address>
#SBATCH --mail-type=START,END
# == Ceres HPC
module load nextflow
# === Set working directory and in/out variables
cd ${SLURM_SUBMIT_DIR}

# # === Using Conda Environments if singularity doesn't run

# === Main Program
 nextflow run isugifNF/polishCLR -r refactor_linebreaks \
  --primary_assembly "GCF_022581195.2_ilHelZeax1.1_chr1.fa" \
  --illumina_reads "testpolish_{R1,R2}.fq" \
  --pacbio_reads "test.1.filtered.bam" \
  --k "21" \
  -profile slurm \
  -with-singularity polishclr.sif
Astahlke commented 1 year ago

Just caught that you're missing the required mitochondrial assembly. We could also improve the code so that a mito assembly is not necessary.

 nextflow run isugifNF/polishCLR -r refactor_linebreaks \
  --primary_assembly "GCF_022581195.2_ilHelZeax1.1_chr1.fa" \
  --mitochondrial_assembly "GCF_022581195.2_ilHelZeax1.1_chr1.fa" \
  --illumina_reads "testpolish_{R1,R2}.fq" \
  --pacbio_reads "test.1.filtered.bam" \
  --k "21" \
  -profile slurm \
  -with-singularity polishclr.sif