As has been mentioned several times, variants are anything that is different from a reference genome, but large insertions of novel DNA represent something of an unknown unknown. If a read doesn't map is it because it's some kind of contamination, or is it because something new has entered into the sample. This tutorial is an attempt to use tools you are already familiar with to identify such novel DNA mutations.
This tutorial assumes you have already installed spades in the assembly tutorial. Verify you have done the minimal amount from that tutorial by activating your environment (conda activate GVA-Assembly) and check the version with the 'spades.py -v' command returns 3.15.4. If not you will need to complete at least the installation and testing of spades described here Genome Assembly (SPAdes) -- GVA2022#InstallingSPAdes
- Extract reads where one or both reads do not map to reference
- de novo assemble reads
Relationship to other tutorials
- As presence of adapter can cause problems with assembly, make sure adapters have been trimmed
- Reads will be mapped with bowtie2
- non-mapped reads will be extracted, consider checking quality of these reads and possible additional trimming as non-mapped reads may have not mapped due to low quality, and thus could be further improved.
- Reads will then be assembled
None of these other tutorials are required to complete this tutorial, but additional information about individual steps may be found there.
Identification of a novel plasmid
One example of novel DNA being present is when a given sample may have a virus or plasmid associated with a sample. Here we will take a sample known to have a high copy plasmid associated with it, but map the reads against only the genome. Unaligned reads would then be expected to be able to assemble into a plasmid.
Get some data
^ above transfers 2 gzipped fastq files and a reference file.
Map read using bowtie2
This is the same process used in the read mapping tutorial, and therefore presented with little comment except to remark on differences. Refer to that tutorial for more in-depth information. Recall we installed bowtie2 in our GVA-bowtie2-mapping environment
You should see version 2.4.5
Remember to make sure you are on an idev done
For reasons discussed numerous times throughout the course already, please be sure you are on an idev done. It is unlikely that you are currently on an idev node as copying the files while on an idev node seems to be having problems as discussed. Remember the hostname command and showq -u can be used to check if you are on one of the login nodes or one of the compute nodes. If you need more information or help re-launching a new idev node, please see this tutorial.
The following command will take ~5 minutes to complete. Before you run the command execute '
bowtie2 -h' so while the command is running you can try to figure out what the different options are doing that we did not include in our first tutorial. Note that in this case we are passing gzipped (compressed) fastq files to bowtie2 rather than uncompressed fastq files. Storing compressed files saves a significant amount of space, and often can be worked with without needing to directly decompress them.Click here to explain the new options.
map in very sensitive local alignment mode
print time info
use 68 processors
reads used for mapping
Sam file detailing mapping
print reads which do not map to the genome to the file
SRR4341249-unmapped-vsl.fastqWhat percent of reads mapped?
The stdoutput of the program listed:
66.62% overall alignment rateHow many reads are in our unmapped fastq file?
grep -c "^+SRR4341249" SRR4341249-unmapped-vsl.1.fastq
Note that head or tail of the fastq file shows that our 3rd line is not just "+", hence why we have to add the additional sequence ID to the grep command
Assemble unmapped reads
This is the same process used in the plasmid assembly portion of the genome assembly tutorial, and therefore presented with little comment except to remark on differences. Refer to that tutorial for more in-depth information.
Attempt to assemble with plasmidspades.py which expects to find circularized plasmid type sequences. Command expected to take ~15 minutes
Additionally attempt to assemble with base spades.py command which uses different internal settings to potentially identify different types of novel DNA from our unmapped reads. Command expected to take ~15 minutes.
Compare contigs generated from different assemblies
Recall from genome assembly tutorial the file we are most interested in is the contigs.fasta file in each output directory (unmapped_plasmid and unmapped_full).
- How many contigs were generated in each case?
2 for the plasmid and 16 for the full
- Are any of the contigs the same?
Probably, both contigs detected in the plasmid mode have similar lengths in the full mode
- What sizes are the contigs?
5441 or 5463
3170 or 3192
14 others less than 500bp in full spade mode
- which is most likely to be our plasmid?
The contig that is 3170 or 3192
- Is that actually our plasmid?
Yes! The actual plasmid reference locus line stats:
LOCUS GFP_Plasmid_Sequ 3115 bp DNA circular UNA 18-NOV-2013Why might the sizes not agree?
My thought is that this was raw fastq files that were fed into the assembly, not trimmed files. Leads me to hypothesize that the difference in size is related to the presence of adapter sequence. Alternatively, it may be that small changes in either bowtie2 or spades versions or read trimmers have influenced what reads are considered. In fact using bowtie 220.127.116.11 and spades 3.13.0 both mappers gave the same stats on these 2 conditions for the largest 2 plasmids (3170 and 5441)
Here we have presented a proof of concept that unmapped reads can be used to find something that we actually did know was present. We also found something that was even longer that wasn't expected.
Additional questions are:
- How might we go about finding out what an assembled product actually is when it truly is novel rather than a positive control?
blast. In fact I did just that and identified it as an artifact of sequencing. The contig corresponds to phiX.
Why does seeing phiX (link to screen shot of blast results) tell me that it is an artifact? phiX is used as a loading control for illumina runs to both tell the difference between a failed run because of bad libraries and a failed run due to poor base diversity.
- How would we decide if it was real or important if we hadn't recognized it?Depends on blast results, how high coverage is compared to genome, gene content
- In other systems what else might you find?viruses, mobile genetic elements, evidence of microbiome, mitochondria, chloroplast, other plasmids
- How does this effect mapping?Consider advanced read mapping with multiple references tutorial
- Do you expect to find more novel DNA in a highly accurate reference file, or a "similar' reference file?Similar. The fact that the reference is not as accurate will lower the alignment scores across the board, potentially dropping below thresholds to be able to anchor the match at all. Look deeper at the bowtie2 mapping command where you used --very-sensative-local mode the documentation tells you about tolerated mismatches etc. The more reads you have that don't match, the more novel DNA inserts you are likely to deal with.
The reads were not trimmed. As a bonus exercise you could trim these reads before redoing the analysis and see how it effects alignment fraction, and assembly statistics.