Answers.Body: <p>Based on back and forth in the comments, I think that you might be interested in a deep mutational scanning workflow, for example <a href="https://jbloomlab.github.io/dms_tools2/examples.html" rel="nofollow noreferrer"><code>dms_tools2</code></a> or <a href="https://github.com/FowlerLab/Enrich2" rel="nofollow noreferrer"><code>enrich2</code></a>.</p>
  <p>These are built specifically for the kind of experiment that you are interested in, if I understand correctly. See attached figure from dms_tools2:</p>
  <p><a href="https://i.sstatic.net/07tZ9.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/07tZ9.png" alt="enter image description here" /></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-31T16:43:55.153Z
Answers.Text: Thank you! I think I will be using enrich2 for this data processing, it matches very well with my needs!
Answers.UserDisplayName: Paul
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-30T21:17:35.547Z
Answers.LastActivityDate: 2021-08-30T21:17:35.547Z
Answers.UserDisplayName: Maximilian Press
Body: <p>I'm working with paired-end NGS reads from an Illumina platform. The sequences I have are all of the same gene, but have one or more substitution mutations each.</p>
  <p>Here is a rough workflow for generating the reads:</p>
  <ol>
  <li>Expression of a library of sequence variants for a heterogeneous protein of interest in phage.</li>
  <li>Selection of high-fitness variants according to a custom assay.</li>
  <li>Extraction of the variant pool via amplification of the variable region of the gene of interest.</li>
  <li>Preparation of Illumina sequencing library from the amplicon pool.</li>
  <li>Deep sequencing of the amplicon pool.</li>
  </ol>
  <p>I've already combined the paired-end reads with USearch and manually removed sequences with subpar quality scores, but I now need to translate all of the remaining DNA sequences into amino acid sequences. I'm uncertain of where to begin addressing this issue, and I was hoping someone could point me in the direction of an application or python package that could assist me.</p>
  <p>My goal: <strong>Count the abundances of each sequence variant within the Illumina data to identify which of the <em>protein</em> sequences are the most fit.</strong></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-30T17:23:27.563Z
Comments.Text: Won't you need to map to a reference? You will need to know what frame to use to translate the reads. Unclear to me what the experimental design is here. Where do these reads come from? Is it an amplicon library? (If it is amplicon it is _possible_ that you don't need to map anywhere.)
Comments.UserDisplayName: Maximilian Press
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-30T17:41:54.920Z
Comments.Text: Reads are coming from a mixed population of phages which express multiple sequence variants of a protein of interest on their surface. The protein of interest is then put under selection. after selection the gene sequences of phages were collected and quantified to identify copy number of each variant in the population. This allows us to determine the fitness of each variant by seeing how many of that sequence there is.
  
  I suppose I might need a reference map, but I am pretty inexperienced to know which program would be best.
Comments.UserDisplayName: Paul
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-30T18:44:18.660Z
Comments.Text: "gene sequences of phages were collected" how? Presumably by sequencing, but what was the sequencing library preparation procedure? Was it whole genome shotgun e.g. nextera prep, locus-specific amplification (i.e. your protein of interest), barcode amplicon, something else? Presumably you limited sequencing to your protein of interest somehow, otherwise this would be a somewhat inefficient workflow.
Comments.UserDisplayName: Maximilian Press
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-30T20:33:36.610Z
Comments.Text: Thank you for these questions! This is not my wet experiment, I am simply trying to use the data. But I can tell you the read libraries were generated with locus specific PCR.
Comments.UserDisplayName: Paul
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-30T21:14:23.393Z
Comments.Text: Ok, one further question: Do all of your forward reads start at the same coordinate? E.g. are most reads mostly the same sequence? If paired-end, same question for reverse reads.
Comments.UserDisplayName: Maximilian Press
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-31T19:17:47.743Z
Comments.Text: I already accepted your answer, but yes this is the case! Thank you very much!
Comments.UserDisplayName: Paul
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-31T19:41:06.317Z
Comments.Text: I might edit your question slightly to include additional relevant info.
Comments.UserDisplayName: Maximilian Press
Tags: <python><proteins><phylogenetics><fastq>
Title: Translate all reads in a .fastq into protein sequence from deep mutational scanning experiment
ThreadText: # Translate all reads in a .fastq into protein sequence from deep mutational scanning experiment
  
  (Asked by: username_0 on 2021-08-30)
  
  I'm working with paired-end NGS reads from an Illumina platform. The sequences I have are all of the same gene, but have one or more substitution mutations each.
  
  Here is a rough workflow for generating the reads:
  
  1. Expression of a library of sequence variants for a heterogeneous protein of interest in phage.
  2. Selection of high-fitness variants according to a custom assay.
  3. Extraction of the variant pool via amplification of the variable region of the gene of interest.
  4. Preparation of Illumina sequencing library from the amplicon pool.
  5. Deep sequencing of the amplicon pool.
  
  I've already combined the paired-end reads with USearch and manually removed sequences with subpar quality scores, but I now need to translate all of the remaining DNA sequences into amino acid sequences. I'm uncertain of where to begin addressing this issue, and I was hoping someone could point me in the direction of an application or python package that could assist me.
  
  My goal: **Count the abundances of each sequence variant within the Illumina data to identify which of the *protein* sequences are the most fit.**
  
  **Tags:** python, proteins, phylogenetics, fastq
  
  > **Comments:**
  > **username_1**: Won't you need to map to a reference? You will need to know what frame to use to translate the reads. Unclear to me what the experimental design is here. Where do these reads come from? Is it an amplicon library? (If it is amplicon it is _possible_ that you don't need to map anywhere.)  
  > **username_0**: Reads are coming from a mixed population of phages which express multiple sequence variants of a protein of interest on their surface. The protein of interest is then put under selection. after selection the gene sequences of phages were collected and quantified to identify copy number of each variant in the population. This allows us to determine the fitness of each variant by seeing how many of that sequence there is.  I suppose I might need a reference map, but I am pretty inexperienced to know which program would be best.  
  > **username_1**: "gene sequences of phages were collected" how? Presumably by sequencing, but what was the sequencing library preparation procedure? Was it whole genome shotgun e.g. nextera prep, locus-specific amplification (i.e. your protein of interest), barcode amplicon, something else? Presumably you limited sequencing to your protein of interest somehow, otherwise this would be a somewhat inefficient workflow.  
  > **username_0**: Thank you for these questions! This is not my wet experiment, I am simply trying to use the data. But I can tell you the read libraries were generated with locus specific PCR.  
  > **username_1**: Ok, one further question: Do all of your forward reads start at the same coordinate? E.g. are most reads mostly the same sequence? If paired-end, same question for reverse reads.  
  > **username_0**: I already accepted your answer, but yes this is the case! Thank you very much!  
  > **username_1**: I might edit your question slightly to include additional relevant info.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-08-30. Score: 2 | Accepted answer
  
  Based on back and forth in the comments, I think that you might be interested in a deep mutational scanning workflow, for example [`dms_tools2`](https://jbloomlab.github.io/dms_tools2/examples.html) or [`enrich2`](https://github.com/FowlerLab/Enrich2).
  
  These are built specifically for the kind of experiment that you are interested in, if I understand correctly. See attached figure from dms\_tools2:
  
  [![enter image description here](https://i.sstatic.net/07tZ9.png)](https://i.sstatic.net/07tZ9.png)
  
  > **Comments:**
  > **username_0**: Thank you! I think I will be using enrich2 for this data processing, it matches very well with my needs!  
  
  ---
  
  