EichlerLab / pav

Phased assembly variant caller
97 stars 8 forks source link

Missing assembly table column: NAME #15

Closed zhixue closed 2 years ago

zhixue commented 2 years ago

Hi! I ran PAV with assemblies.tsv format, but had this error:

RuntimeError in line 93 of /lustre/home/mypath/tool/pav-v1.2.1/Snakefile:
Missing assembly table column: NAME

But I checked the assemblies.tsv, and the first column exists. I am wondering what else I need to prepare.

My slurm script (to generate runlocal.sh, assemblies.tsv and config.tsv) is here:

#!/bin/bash
#SBATCH --time=72:00:00
#SBATCH -J H16-pav
#SBATCH -p cpu
#SBATCH --mail-user=myemail
#SBATCH --mail-type=ALL
#SBATCH -n 40
#SBATCH --output=%J.out
#SBATCH --error=%J.err
#SBATCH --exclusive

module load minimap2
module load miniconda3
module load samtools

source activate pav121

sample=H16
ref=/lustre/home/mypath/ref/NDH.Chr.fa
th=40
ass=/lustre/home/mypath/assembly/${sample}.fa
ass2=/lustre/home/mypath/pav/empty.fa
mkdir ${sample}
cd ${sample}

ln -s /lustre/home/mypath/tool/pav-v1.2.1/runlocal ./

mkdir config
echo "snakemake -s /lustre/home/mypath/tool/pav-v1.2.1/Snakefile \$@" > config/runlocal.sh
echo -e ${sample}"\t"${ass}"\t"${ass2} > assemblies.tsv
echo '{"reference":"'${ref}'","assembly_table":"'${PWD}'/assemblies.tsv"}' > config.json

./runlocal $th ${sample}.vcf.gz 

My config json is here:

{"reference":"/lustre/home/mypath/ref/NDH.Chr.fa","assembly_table":"/lustre/home/mypath/pav/H16/assemblies.tsv"}

My assemblies.tsv is here:

H16    /lustre/home/mypath/assembly/H16.fa    /lustre/home/mypath/pav/empty.fa

Another thing is that, it is better if matplotlib_venn and snakemake can be added in Dependencies.

paudano commented 2 years ago

assemblies.tsv needs column headings.

NAME HAP1 HAP2 H16 /lustre/home/mypath/assembly/H16.fa /lustre/home/mypath/pav/empty.fa

Also, if "empty.fa" is an empty file, you can just leave that out (if "HAP2" in assemblies.tsv is blank, PAV will treat it like an empty haplotype). An empty FASTA was a once requirement for PAV to run an unphased assembly, but it no longer is.

zhixue commented 2 years ago

Thank you!

It passed but a new error occurred. I will raise an new issue and close this one.