Repository navigation
Releases: sramosonsins/vcf2tfa
Releases · sramosonsins/vcf2tfa
Release list
v1.0.1
Change log Version 1.0.2
Usage:
vcf2tfa -v input.vcf(.gz) -r reference.fa(.gz) -c ploidy [-o outputname] [-n chromosomes.txt] [-i 0/1]
- repository name changed to avoid confusion
Change log Version 1.0.1
Usage:
gVCF2tFasta -v input.vcf(.gz) -r reference.fa(.gz) -c ploidy [-o outputname] [-n chromosomes.txt] [-i 0/1]
- add -c INT option to take ploidy as input
Change log Version 1.0.0
Usage:
gVCF2tFasta -v input.vcf(.gz) -r reference.fa(.gz) [-o outputname] [-n chromosomes.txt]
Note: Structural Variants are considered as missing data (N)
gVCF2tFasta arguments/options:
-h Help and exit
-v Input VCF file
-r Reference Fasta file
-o Optional Output compressed tFasta filename, Default same as input vcf file
-n Optional File with chromosome(s) to convert and its length, Default use all sequences as in reference fasta file
-i Imputation (Only use with VCF files, not gVCF files):
0 if missing data in VCF is equal to N in tFasta
1 if missing data in VCF is equal to reference fasta in tFasta
Default value is 0
Input and Output Files
Input Files and Flags
- VCF file (input.vcf(.gz)) : accepts both uncompressed and compressed files (gzip , bgzip). The input VCF file must be sorted.
- Reference Fasta file (reference.fa(.gz)) : accepts both uncompressed and compressed files (only bgzip). An index file (.fai) is created for the reference fasta file if it does not exist.
- File with chromosome(s) to convert and its length (chromosomes.txt) : Optional File with chromosome(s) to convert and its length, Default use all sequences as in reference fasta file, if not provided.
- Output compressed tFasta filename (outputname) : Optional Output compressed tFasta filename, Default same as input vcf file, if not provided.
- Imputation (Only use with VCF files, not gVCF files) : 0 if missing data in VCF is equal to N in tFasta, 1 if missing data in VCF is equal to reference fasta in tFasta, Default value is 0.
Output Files
- Output tfasta file : The output tfasta file is compressed (bgzip).
- Index file : An index file (.tbi) is created for the output tfasta file.
v1.0.0
Change log Version 1.0.0
Usage:
gVCF2tFasta -v input.vcf(.gz) -r reference.fa(.gz) [-o outputname] [-n chromosomes.txt]
Note: Structural Variants are considered as missing data (N)
gVCF2tFasta arguments/options:
-h Help and exit
-v Input VCF file
-r Reference Fasta file
-o Optional Output compressed tFasta filename, Default same as input vcf file
-n Optional File with chromosome(s) to convert and its length, Default use all sequences as in reference fasta file
-i Imputation (Only use with VCF files, not gVCF files):
0 if missing data in VCF is equal to N in tFasta
1 if missing data in VCF is equal to reference fasta in tFasta
Default value is 0
Input and Output Files
Input Files and Flags
- VCF file (input.vcf(.gz)) : accepts both uncompressed and compressed files (gzip , bgzip). The input VCF file must be sorted.
- Reference Fasta file (reference.fa(.gz)) : accepts both uncompressed and compressed files (only bgzip). An index file (.fai) is created for the reference fasta file if it does not exist.
- File with chromosome(s) to convert and its length (chromosomes.txt) : Optional File with chromosome(s) to convert and its length, Default use all sequences as in reference fasta file, if not provided.
- Output compressed tFasta filename (outputname) : Optional Output compressed tFasta filename, Default same as input vcf file, if not provided.
- Imputation (Only use with VCF files, not gVCF files) : 0 if missing data in VCF is equal to N in tFasta, 1 if missing data in VCF is equal to reference fasta in tFasta, Default value is 0.
Output Files
- Output tfasta file : The output tfasta file is compressed (bgzip).
- Index file : An index file (.tbi) is created for the output tfasta file.
v0.2.0
VCF2tFasta Version 0.2 prior to 2024 updates
Convert gVCF files to transposed fasta format (tfasta, indexed and compressed).
Jordi Leno-Colorado
Usage:
./gVCF2tFasta -v input.vcf(.gz) -r reference.fa(.gz) -o outputname -n chromosomes.txt
Note: Structural Variants are considered as missing data (N)
Flag Options:
-h Help and exit
-v Input VCF file
-r Reference Fasta file
-o Output compressed tFasta filename (without extension)
-n File with chromosome(s) to convert and its length
-i Imputation (Only use with VCF files, not gVCF files):
0 if missing data in VCF is equal to N in tFasta
1 if missing data in VCF is equal to reference fasta in tFasta
Default value is 0
To compile:
make -f nbproject/Makefile-Release.mk build/Release/GNU-Linux/main.o
mkdir -p build/Release/GNU-Linux
rm -f "build/Release/GNU-Linux/main.o.d"
g++ -std=c++0x -lz -c -O2 -MMD -MP -MF "build/Release/GNU-Linux/main.o.d" -o build/Release/GNU-Linux/main.o sources/main.cpp
/usr/bin/make -f Makefile CONF=Release
Examples:
Convert a compressed single individual VCF file to a compressed tFasta file
../bin/gVCF2tFasta -v example.vcf.gz -r ref.fa.gz -o example -n ref.fa.fai
Convert a VCF file with the SNPs of a pool to a compressed tFasta file
../bin/gVCF2tFasta -v pool_p10.vcf -r ref.fa.gz -o pool -n ref.fa.fai
Convert a compressed multiple individual VCF file to a compressed tFasta file
../bin/gVCF2tFasta -v ./gatk_combined.vcf_10lines.recode.vcf.gz -r ./pdulcis26.contigs_Pd1-8.fa -o ./TEST_almond_10lines -i 0 -n ./pdulcis26.chromosomes.lengths