Skip to content
Lindsay Clark edited this page Aug 9, 2018 · 3 revisions

For reference, here is the list of internal functions in TagDigger.

Core TagDigger program:

  • combine_barcode_and_cutsite: Add restriction cut sites to the end of each barcode in a list
  • tree_one_level: Take a set of sequences, sort them by the first letter, return a set of lists.
  • tree_recursive: Build tree recursively for indexing sequences (either barcodes or tags) rapidly
  • build_sequence_tree: Give each sequence a number to use for indexing, then build tree
  • sequence_index_lookup: Lookup a sequence in an index tree, and get the index
  • enumerate_cut_sites: Given an ambiguous cut site written in IUPAC codes, generate all possible cut sites
  • find_tags_fastq: Make indexing trees for barcodes, cut sites, and tags, then go through a FASTQ file and count up instances of barcode*tag combos
  • isFastq: Check the first four lines of a file, return 1 if is it an unzipped FASTQ file, 2 if it is gzipped FASTQ file, and 0 if it is neither or if it can't be opened
  • readBarcodeKeyfile: Read in a csv file containing file names, barcodes, and sample names, and output a dictionary containing this information

Reading tags:

  • compareTags: Find SNP alleles within a set of sequence tags representing the same locus
  • readTags_UNEAK_FASTA: Read in pairs of tags from a FASTA file output by the TASSEL UNEAK pipeline
  • readTags_Rows: Read a CSV of sequence tags, where each row has a marker name, an allele name, and a tag sequence
  • readTags_Columns: Read a CSV of sequence tags, where each row has a marker name and two tag sequences representing two alleles
  • readTags_Merged: Read a CSV of sequence tags, where each row has a marker name and a tag sequence with polymorphic nucleotides in square brackets separated by a forward slash
  • readTags_Stacks: Read tags from the catalog format produced by Stacks
  • readTags_TASSELSAM: Read tag sequences from a SAM file and match marker names using the same conventions as TASSEL-GBSv2
  • readTags_pyRAD: Read the .alleles output from pyRAD and import tags
  • readMarkerNames: Read in a simple list of marker names, and use for selecting markers to keep from a larger list of tags
  • readTags_interactive: Interactively read in sequence tags
  • sanitizeTags: Eliminate tags that will cause problems from the list (i.e. tags that are shorter versions of other tags)

TagDigger results export:

  • combineReadCounts: Combine read counts across multiple libraries, merging samples with identical names

  • writeCounts: Write a CSV file of tag counts

  • extractMarkers: Get marker names, allele names, and indexes from tag names

  • writeDiploidGeno: Write numeric diploid genotypes to a CSV file

  • set_directory_interactive: Allow user to change working directory

Barcode splitter:

  • reverseComplement: Make the reverse complement of a nucleotide sequence
  • build_adapter_tree: Build a set of indexing trees, one for each barcode, for rapidly searching for adapter sequence at the end of a sequence
  • findAdapterSeq: Find restriction site and/or adapters in a sequence, and give an index for slicing the string to remove them
  • barcodeSplitter: Function to split one FASTQ file into multiple files by barcode, removing barcode and adapter sequence
  • writeMD5sums: Write a CSV of file names and MD5 checksums, given a list of file names

Tag manager:

  • exportFasta: Function to take a list of tags and export to a FASTA file for use in an alignment program such as Bowtie2 or BLAST
  • varSitesByMarker: Across a set of tags as imported by a readTags function, make a dictionary of the positions of all variable sites for each marker
  • readSAM: Read in a SAM file of alignment information for markers
  • mergeTags: Given a list of sequences, produce an output string in "merged" format, with square brackets surrounding the variable region and a forward slash(es) separating the two or more variants
  • mergedTagList: Given a list of tag names and tags such as those output by the readTags functions, output a list of marker names and a list of merged tag strings
  • readTabularData: Read in a table of extra columns to include in tag database
  • writeMarkerDatabase: Write a CSV giving sequence and other information for markers
  • readMarkerDatabase: Read in a CSV file containing a SNP marker database as produced by writeMarkerDatabase
  • lookupMarkerByTag: For a set of tags corresponding to one marker for the query, retrieve a set of markers with matching tags
  • sortTagsBySeq: Take tags output by one of the readTags functions, and return tags and tag names in the same format but sorted by sequence (for binary search)
  • compareTagSets: Compare two sets of tags, in the format output by the readTags function. Return a dictionary where the keys include all marker names from newtags, and the items are the marker names from oldtags (if found)
  • consolidateTagSets: Allowing for multiple tags per marker, and for tag sets that do not completely overlap between old and new markers, make a consolidated set of tags and marker names
  • allColumns: Combine all column names into one list
  • consolidateExtraCols: Consolidate data from columns with the same column header

New functions to be incorporated into programs

  • remove_monomorphic_loci: Given a set of imported tags, filter out any belonging to monomorphic loci

Clone this wiki locally