Hello,

For a start your bgzip command looks wrong.  You probably want something like
this:

bgzip -c $file > $bfile

If that doesn't work, let me know what error messages/output you are getting.

Regards,

Andrew
________________________________________
From: Baiba Alksere <baiba.alks...@gmail.com>
Sent: 12 October 2020 08:25:02
To: samtools-help@lists.sourceforge.net
Subject: [Samtools-help] tabix and bgzip [EXT]

Hello,
I have problem with VCFtools running

I have code like this, but tabix is not recognizing input file as bgzf 
(however, i am bgzipping it)

#!bin/bash
module load bio/vcftools/0.1.17
module load bio/samtools/1.10

export inpath=/dir

export outpath=/dir
mkdir -p $outpath
chmod u+rwx $outpath
export reference=/ref
$reference
for file in $inpath/* ;
do
        bname=$(basename $file)
        echo "base name is $bname"
        bfile=$outpath/$bname".bgz"
        tabfile=$outpath/$bname".tabix"
        outfile=$outpath/$bname".fasta"
        bgzip $file $bfile
        cd $outpath
        tabix -f $bfile > $tabfile
        cat $reference | vcf-consensus $tabfile > $outfile
done

--
Best regards
Baiba Alkšere


-- 
 The Wellcome Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 


_______________________________________________
Samtools-help mailing list
Samtools-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/samtools-help

Reply via email to