Skip to content
Lindsay Clark edited this page Sep 8, 2017 · 5 revisions

Tag sequences can be read in one of several different formats. Regardless of format, the following must be true:

  • The restriction site does not need to be present in the tag sequences provided by the user. However, if it is present in some tags, it must be present in all.
  • Marker names must not contain underscores.

Formats that code for biallelic markers will label the sequence tags in each pair as "0" or "1". These labels can then be used when the SNPs are converted to numeric format. A homozygote for the 0 allele is coded as 0, a homozygote for the 1 allele is coded as 2, and a heterozygote is coded as 1.

For all formats, the user can optionally supply a list of markers to retain from the tag file. (For example, if you have thousands of markers in your tag file, but you just want to examine a few dozen.) The list can be supplied in a plain text or CSV file with one marker name per line, and no other content.

Example list of markers:

TP276
TP1003
TP1206

UNEAK FASTA

TASSEL's UNEAK pipeline produces a FASTA file in the following format that can be read by TagDigger:

>TP276_query_64
TGCAGAAAAAAAAATCACAGCACAGGCACTAGAAGCACTGGTAGTAACTCGAGACAGGATGTAT
>TP276_hit_64
TGCAGAAACAAAAATCACAGCACAGGCACTAGAAGCACTGGTAGTAACTCGAGACAGGATGTAT
>TP539_query_64
TGCAGAAAAAAACTTGAGAAAGGCCGTACTTTTAAAGTGTATTATAGAAAAATCTTAGGTGCAT
>TP539_hit_64
TGCAGAAATAAACTTGAGAAAGGCCGTACTTTTAAAGTGTATTATAGAAAAATCTTAGGTGCAT

The number at the end of each comment line indicates the length of the tag, and is used by TagDigger to trim off poly-A padding that is added by UNEAK to tags containing a restriction cut site.

TagDigger will also find the SNP for each tag pair and include the nucleotide in the tag name. Tags are assigned to be '0' or '1' based on alphabetical order of the SNP alleles, to be consistent with the hapMap2numeric and hapMap2genlight functions.

Merged tags

Tags can also be read in the following CSV format, which saves computer memory and makes it easy for a human eye to see the SNP(s):

Marker name,Tag sequence,
TP276,TGCAGAAA[A/C]AAAAATCACAGCACAGGCACTAGAAGCACTGGTAGTAACTCGAGACAGGATGTAT,
TP539,TGCAGAAA[A/T]AAACTTGAGAAAGGCCGTACTTTTAAAGTGTATTATAGAAAAATCTTAGGTGCAT,

The nucleotides before and after the forward slash will be the 0 and 1 alleles, respectively.

Polymorphic regions can be more than one nucleotide long, and there can be more than one forward slash in the sequence (but only one pair of square brackets, so phasing can be inferred). For example:

Mrkr2010,ACGTAAACGATA[AAG/GAC]TACGATAAATTT,
Mrkr2011,GGATAAC[CAC/TAC/TAT]GGATTA,
Mrkr2012,CTCCAAGACCT[AG/C-]TTTTACGGG,

These tags will be named Mrkr2010_AAG_0, Mrkr2010_GAC_1, Mrkr2011_CAC_0, Mrkr2011_TAC_1, Mrkr2011_TAT_2, Mrkr2012_AG_0, and Mrkr2012_C-_1.

Tags in columns

Two alternative tag sequences for one marker can be arranged in columns of a CSV:

Marker name,Tag sequence 0,Tag sequence 1,
TP276,TGCAGAAAAAAAAATCACAGCACAGGCACTAGAAGCACTGGTAGTAACTCGAGACAGGATGTAT,TGCAGAAACAAAAATCACAGCACAGGCACTAGAAGCACTGGTAGTAACTCGAGACAGGATGTAT,
TP539,TGCAGAAAAAAACTTGAGAAAGGCCGTACTTTTAAAGTGTATTATAGAAAAATCTTAGGTGCAT,TGCAGAAATAAACTTGAGAAAGGCCGTACTTTTAAAGTGTATTATAGAAAAATCTTAGGTGCAT,

Tags in rows

Each tag can be in its own row in a CSV file. Any number of alleles per marker is allowed. Alleles can have any name, but the names '0' and '1' will facilitate the use of other TagDigger tools for biallelic markers.

Marker name,Allele name,Tag sequence,
TP276,0,TGCAGAAAAAAAAATCACAGCACAGGCACTAGAAGCACTGGTAGTAACTCGAGACAGGATGTAT,
TP276,1,TGCAGAAACAAAAATCACAGCACAGGCACTAGAAGCACTGGTAGTAACTCGAGACAGGATGTAT,
TP539,0,TGCAGAAAAAAACTTGAGAAAGGCCGTACTTTTAAAGTGTATTATAGAAAAATCTTAGGTGCAT,
TP539,1,TGCAGAAATAAACTTGAGAAAGGCCGTACTTTTAAAGTGTATTATAGAAAAATCTTAGGTGCAT,
Mrker2035,dom,AGCTAGACTAGGGTTACCAGTACTTACCGATACATTAAAGCATCAT,
Mrker4050,0,AGTAGGGAAAGGCCGGTAAGGCAACTAAA,
Mrker4050,1,AGTAGGGAGAGGCCGGTAAGGCAACTAAA,
Mrker4050,2,AGTAGGGAAAGGCCGGCAAGGCAACTAAA,

Stacks catalog

The program cstacks from the Stacks software generates three files in the format batch_X.catalog.tags.tsv, batch_X.catalog.snps.tsv, and batch_X.catalog.alleles.tsv. TagDigger can read all three of these files and extract tag sequences. Marker names will be numbers identical to the Catalog IDs in Stacks. There is an option to ignore all non-biallelic markers. If the file name ends with ".gz", TagDigger will assume it is gzipped, and otherwise will assume it is not compressed.

SAM files from TASSEL-GBSv2

TASSEL 5 includes as part of its pipeline a SAM file produced by Bowtie2 or BWA. TagDigger can read tag sequences from this file and generate SNP names in the same format as the TASSEL GBS version 2 pipeline. Since TASSEL can output multiple SNPs from the same tag, TagDigger generates a different set of names for the tags (in the format chromosome-position-strand_allele) but can output a CSV file matching the TASSEL SNP names to the TagDigger marker names. If supplying a list of markers to retain, the user should put them in the format of TASSEL SNP names (e.g. S01_1026). There is also an option to ignore all non-biallelic markers.

.alleles file from pyRAD

The software pyRAD has an option to output a .alleles file containing two consensus sequences per individual for all loci. This file can be read directly by TagDigger, which finds all unique sequences for each locus. Like other TagDigger import options, the user can optionally supply a text file with a list of markers to retain, which in this case should be the marker numbers from pyRAD. There is also an option to only retain biallelic markers.

Unlike other RAD-seq pipelines, pyRAD can detect insertion and deletion mutations. TagDigger is able to determine read counts and genotypes for both indels and substitution mutations identified by pyRAD.

Clone this wiki locally