Converts DArT 2 row formatted csv files to vcf.
The only required argument is a path to your dart 2row csv file.
dart2vcf.py Report_DHal_some_dart_file.csv > dartfile.vcfIf you provide a reference genome with the -g option, dart2vcf will use bwa mem to map the DArT tag sequences to the genome and then infer genomic position of each SNP. This information is then used to construct the CHROM and POS fields of the resulting vcf file.
dart2vcf.py -g genome_ref.fasta Report_DHal_some_dart_file.csv > dartfile.vcfWhen using this option your genome ref should already be indexed, which you would do with bwa like this
bwa index genome_ref.fastaDArT provides SNP information and raw counts in separate files. If you want individual read counts for each genotype call you can use the option -c to provide the matching RawCounts file.
dart2vcf.py -g genome_ref.fasta Report_DHal_some_dart_file_SNP.csv dart2vcf.py -c Report_DHal_some_dart_file_RawCounts.csv > dartfile.vcfIf you have data represented co-analysis across multiple batches there is a high chance of sample name collision. To make it easier to properly identify samples you can use the -b option to prepend the batch ID to each sample
dart2vcf.py -g genome_ref.fasta Report_DHal_some_dart_file_SNP.csv dart2vcf.py -c Report_DHal_some_dart_file_RawCounts.csv -b > dartfile.vcfThe vcf produced by this tool will contain all of the DArT locus info in the INFO field of the vcf. Genotypes are encoded as a/b where a is the allele (1 or 0) in the first row and b is the allele in the second row.
The vcf output from this tool is sorted alphabetically by chromosome/scaffold name and by position (within each chrom).
Chromosome/scaffold names are not added to the vcf header. You can fix this issue by indexing the vcf
bgzip mydart.vcf
tabix mydart.vcf.gz
bcftools view -h mydart.vcfbwa is required for mapping genomic coordinates
The htslib suite of tools is recommended for working with the resulting vcf.
- Infer ALT and REF alleles properly. Currently these are set to maj/min respectively but could be inferred from the
AlleleSequencefield - Parse CIGAR string to handle cases involving indels
- Use a tmp file for tag sequences so this can be cleaned up properly after running
bwa