I have a fastq file. I would like to alter it with and insertion or deletion.
What is the best way to go about doing this?
edit: must be for use with fastq
Why would you like to do this? If you're looking to simulate a variant, exact knowledge of where the read will map (as well as what other reads might map to the same locus) would be required, otherwise the alteration may be discarded as a sequencing anomaly.
I would like to insert a true positive variant event into the fastq file to test whether or not the pipeline will detect the variant inserted/deleted at a given position.
Seems like the easier thing to do is to insert the event into the reference.
Second that, there are multiple tools to mutate a fasta file. From this fasta file you can then simulate fastq reads, with which you can test your pipeline. That's the most appropriate test. Inserting a variant in a read/fastq is not a valid approach.
Why not do it at the SAM level? Variant callers don't usually work on FASTQ directly!
I was only given a fastq file to work with
Align it, and you'll have a SAM/BAM file. Either modify that file and get the pipeline started at that stage, or (not sure if this will work) figure out which reads align to a target location and modify those reads. With the second approach, be aware that modifying the reads can lead to them aligning to a different location.
I'm sure that this way makes the most sense, but I need to specifically use a fastq file, per the request of the assignment
Like a homework assignment or an actual project/task?
This is an actual project/task
The other way you might do this, though it's pretty bass ackwards, is to make a reference file with variants, then simulate a fastq from that reference.
Login before adding your answer.