Package: asTair
asTairis a toolchain to process DNA modification sequencing data.asTairwas designed primarily for handlingTET-Assisted Pyridine Borane (TAPS) sequencingoutput, but also contains functions that are useful for Bisulfite Sequencing (BS) data.Basic usage0. InstallationInstallation throughpipis the easiest way to getasTair, and it works in python2 and 3:pipinstallastairYou should now be able to callastair:astair--helpUsage: astair [OPTIONS] COMMAND [ARGS]...

  asTair (tools for processing cytosine modification sequencing data)

Options:
  --help  Show this message and exit.

Commands:
  align     Align raw reads in fastq format to a reference genome.
  call      Call modified cytosines from a bam or cram file.
  filter    Look for sequencing reads with more than N CpH modifications.
  find      Output positions of Cs from fasta file per context.
  idbias    Generate indel count per read length information (IDbias).
  mbias     Generate modification per read length information (Mbias).
  phred     Calculate per base (A, C, T, G) Phred scores for each strand.
  simulate  Simulate TAPS/BS conversion on top of an existing bam/cram file.
  summarise  Collects and outputs modification information per read.

  __________________________________About__________________________________
  asTair was written by Gergana V. Velikova and Benjamin Schuster-Boeckler.
  This code is made available under the GNU General Public License, see
  LICENSE.txt for more details.
                                                           Version: 3.x.xIn general, you can use--helpon allastairsub-commands to get detailed instructions on the available options.(If for some reasonpipis not an option,check our FAQfor further ways to installasTair.)All of the examples in the main part of the current tutorial are based on the assumption that the input sequencing data areTAPSpair-end sequencing reads, however, asTair analyses can be run in single-end mode (--se).  Also, asTair enables you to run analyses onWGBSdata, which requires a running installation ofbwa-methfor the alignment step. For more information on WGBS analyses you may check the sectionAnalysis of WGBS data (or other unmodified cytosine to thymine conversion methods).1. Align readsWe will assume that you have generated paired-end sequencing data, which is stored in two fastq files. For this brief tutorial, we assume the files are calledlambda.phage_test_sample_R1.fq.gzandlambda.phage_test_sample_R2.fq.gz. If you want to follow this tutorial, you can download the files here:# Or use curl -O if wget is not availablewgethttps://zenodo.org/record/2582855/files/lambda.phage_test_sample_1.fq.gz
wgethttps://zenodo.org/record/2582855/files/lambda.phage_test_sample_2.fq.gzThe raw reads need to be aligned. asTair contains a command to help with this. It assumes thatbwaandsamtoolsare available on your system. (If you prefer to use a different aligner,skip to step 2.)You will also need an indexed reference genome to align to, which can be given as a bgzip compressed file. For this example we are using the lambda phage genome, which you can download withwgethttps://zenodo.org/record/2582855/files/lambda_phage.fa
wgethttps://zenodo.org/record/2582855/files/lambda_phage.fa.faiNow, you are ready to align:mkdir-poutput_dir
astairalign-flambda_phage.fa-1lambda.phage_test_sample_1.fq.gz-2lambda.phage_test_sample_2.fq.gz-doutput_dirIf the reference FASTA file contains spaces in the header, algnment and calling will proceed using only the first word in the description unless the parameters '--add_undescores' and '--use_underscores' (aligner only) are used.2. Call methylationOnce your fastq files are aligned and sorted (done automatically byastair align), you can runastair callto create a list of putative modified positions:astaircall-ioutput_dir/lambda.phage_test_sample_mCtoT.cram-flambda_phage.fa--contextCpG--minimum_base_quality13-doutput_dir/3. Interpret resultsAfter calling methylation, you will find two additional files inoutput_dir:lambda.phage_test_sample_mCtoT_mCtoT_CpG.statslambda.phage_test_sample_mCtoT_mCtoT_CpG.modsThe.statsfile contains global statistics on the modification rate in different sequence contexts. You can use this to get an idea of the overall level of modification in your sample. Here you will find information about how many cytosine positions of certain context are in the reference, how many of them were covered, and how many reads were modified/unmodified at the covered positions on the relevant strand assuming directionality. In our example here, we used a 1:1 mixture of in-vitro modified and unmodified lambda phage, so the results show a methylation rate of approximately 50% :CONTEXTSPECIFIC_CONTEXTMEAN_MODIFICATION_RATE_PERCENTTOTAL_POSITIONSCOVERED_POSITIONSMODIFIEDUNMODIFIEDCpG*48.22562256225356153382377*CGA44.647121012106416079545*CGC48.5951730173097842103499*CGG48.93618471847108283112991*CGT49.862143814388586886342The.modsfile contains per-position information on your sample:CHROMSTARTENDMOD_LEVELMODUNMODREFALTSPECIFIC_CONTEXTCONTEXTSNVTOTAL_DEPTHlambda341.0230CTCGGCpGNo57lambda450.0034GACGCCpGNo71lambda671.0380CTCGACpGNo104lambda781.0580GACGCCpGNo127lambda12131.0880CTCGCCpGNo240lambda13140.00139GACGACpGNo250The header should be mostly self-explanatory.MODandUNMODrefer to the number of reads covering that base that showed evidence of modification/no modification, and were of the right orientation to be meaningful for modification calling. The total coverage, including reads that were oriented in a way that no modification information can be extracted, is shown inTOTAL_DEPTH.SNVgives a heuristic indication whether the position is indeed a modified base, or a genetic C to T variant in the genome of the sample.Other useful informationRecommendations for data pre-processingDo quality control of the sequencing reads and do quality trimming before mapping and dispose of very short reads, usingFastQC,trimgaloreor similar tools.In most cases, it will be best to remove PCR duplicates before running the modification caller, unless your reads are non-randomly fragmented (e.g. enzymatically digested).Check the fragment (insert) size distribution and decide on an overlap removal method for paired-end reads. The simplest option is the default removal of overlaps handled byastair call, which will randomly select one of two overlapping reads. This behaviour can be disabled by the-scoption, in case you are using a more sophisticated overlap-clipping tool.For speed and convenience we recommend using the--per_chromosomeoption, if possible, in order to run multiple processes in parallel. This also reduces the memory requirement when asTair is run on a desktop machine.Analysis of WGBS data (or other unmodified cytosine to thymine conversion methods)The analysis pipeline for bisulfite sequencing data does follows the same steps as TAPS data analysis, but requires different options. We again start from fastq files. To avoid Bismark-style double-alignments, we prefer to usebwa meth, which can be used directly throughastair alignwhen you choose the--method CtoToption.mkdir-poutput_dir
astairalign-flambda_phage.fa-1lambda.phage_test_sample_BS_1.fastq.gz-2lambda.phage_test_sample_BS_2.fastq.gz--methodCtoT-doutput_dir/You can now useastair callwith--method CtoTfor the modifcation calling:astaircall-ioutput_dir/lambda.phage_test_sample_BS_CtoT.cram-flambda_phage.fa--methodCtoT--contextCpG--minimum_base_quality13-doutput_dir/Further informationMore information on other asTair toolsasTair FAQLicenseThis software is made available under the terms of theGNU General Public License v3.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.