3
$\begingroup$

I am new to using bioinformatic tools and I was hoping this community could help clear something up for me. I need to generate a gtf file. My data are a set of complete HA genes for influenza B viruses in fasta format. From reading through forums and other internet searches, my understanding is that fasta cannot be transformed to gtf or gff because these last two provide location information which fasta does not (unless available in the header). I saw someone suggest mapping sequences to a reference sequence and generating the gtf from that mapping.

My question is, would it make sense to use the consensus sequence selected for alignment as this reference sequence? The alignment algorithm is a simple majority rule. Because all my data are complete genes, I would think the mapping of locations (start codon and stop codon) would be the same no matter which sequence in my data set I choose to use. Is this not so?

I am looking at viral evolution in the HA segment and my end goal is to calculate the dS/dN ratio for a set influenza B viruses collected during a particular season. The program I want to use requires a gtf, but likely other options would only require the reference genome. Would it make more sense to use the strain used as the vaccine candidate as the reference genome?

I appreciate any help you can provide me!

$\endgroup$
8
  • $\begingroup$ Welcome to the site. I am not used to work with gtf, but you'll probably need a reference genome in order to align your sequences to the genome. Do you have a reference genome for the influenza B virus? What I know is that viruses change quite a lot and probably there are several genomes available. You seem familiar with alignments but you way that it is a matter of "simple majority rule", some algorithms are designed for short sequences or faster while some other are optimized for more accurate mapping, so it is not just a majority rule, but others will answer you with more detail than I can. $\endgroup$
    – llrs
    Mar 5, 2019 at 14:57
  • $\begingroup$ I think the answer is no. Let me check with my colleague who has more expertise in gtf or gff, before I cite my reasons and suggested way forward. Are you working within or associated with Derek Smith's lab (Cambridge)? $\endgroup$
    – M__
    Mar 5, 2019 at 15:26
  • $\begingroup$ In summary, yes to this "I saw someone suggest mapping sequences to a reference sequence and generating the gtf from that mapping." and no to this "My question is, would it make sense to use the consensus sequence selected for alignment as this reference sequence?" $\endgroup$
    – M__
    Mar 5, 2019 at 15:28
  • $\begingroup$ @MichaelG. Thank you for looking into this for me! No, I am not working within or associated with Derek Smith's lab in any way. Could you expand on why using the consensus sequence does not make sense? $\endgroup$
    – Lindsey
    Mar 5, 2019 at 16:55
  • $\begingroup$ I would still like to understand why using the consensus sequence does not make sense, but my other way forward is to use the sequence for the strain used as the vaccine candidate for that particular season. Does this make more sense? Because influenza has such a high mutation rate, it would seem that having a "standard" reference genome would not apply as it does for human genomes. $\endgroup$
    – Lindsey
    Mar 5, 2019 at 17:21

3 Answers 3

1
$\begingroup$

I was wanting more time, but okay here's what I'm thinking,

Would it make more sense to use the strain used as the vaccine candidate as the reference genome?

Neither, because the GTF format is based on an HA protein structure (likely a crystal structure but could be cryoEM). This is not the same as an alignment position within a surface antigen, because most alignments of pathogen surface antigen genes will contain indels, e.g. between the GTF and your influenza epidemic. If HA doesn't have any indels fine, but I would be surprised.

The indels will cause artifactual shifts in the GTF domain boundaries unless they are corrected. Put simply an alignment position (particularly for pathogen surface antigen proteins) is rarely the same as the amino acid position of GFT because a protein structure of a surface antigen doesn't comprise indels in its native form.

If you do this work in detail, i.e. shifting between protein structure and phylogeny, you always write scripts which convert between aligned positions and "reference" (crystal/ cryoEM structure) positions. Its a common way of thinking.

So in summary, your reference sequence is the GTF sequence because that is the basis of the structure<-> alignment conversion


For positive selection analysis it does not matter what the reference is, all that matters is the correct rooting. For demarcation of domains within HA the GFT sequence needs to be at the top of the alignment 1) because it helps easily identify whether it contains indels 2) structure programs will expect the reference sequence to be there. If you are using the vaccine in a positive selection analysis ... you need to think hard about the question you are asking and the coverage of the vaccine. Epidemiologically speaking thats complicated because the passage of the vaccine will be an important source of selection and you will mistake that as the wild-type "escaping" the vaccine.

$\endgroup$
4
  • 1
    $\begingroup$ What I was suggesting was using the sequence for the HA segment of the vaccine candidate as the reference sequence used for the mapping and subsequent generation of the gtf. I'm not sure I made that clear. As you say, the HAs of the epidemic are likely to have a lot of indels, but still, some sequence must be considered the reference on which to align. In viruses with high mutation rates, what would make a good reference sequence? $\endgroup$
    – Lindsey
    Mar 5, 2019 at 20:00
  • $\begingroup$ I've amended above $\endgroup$
    – M__
    Mar 5, 2019 at 20:56
  • 1
    $\begingroup$ So if I am understanding you correctly, I could use either the consensus sequence or the vaccine candidate HA sequence (or any sequence) as the reference in a positive selection analysis as long as I have the correct rooting. I'm not sure if I fully understood the last part of what you amended, but my set of HA sequences come from influenza cases, none are from the vaccine. $\endgroup$
    – Lindsey
    Mar 7, 2019 at 19:00
  • $\begingroup$ Hi Lindsey, .... firstly NEVER use the consensus sequence in a positive selection analysis - even if we disagree about the epidemiological focus of your study - NEVER use consequence in a phylogenetics analysis. However, yes the maximum likelihood approach to positive selection (the only one worth bothering about), the correct root is important. In other positive selection calculations (distance), it is will not make much difference. $\endgroup$
    – M__
    Mar 7, 2019 at 21:19
3
$\begingroup$

"Transforming" Fasta files to GTF or GFF3 files is a common request, as are similar tasks such as "converting" BAM files to VCF files. But these are underdefined questions, and "transform" or "convert" isn't really the right way to think about the task.

As far as your particular request is concerned, Fasta files and GTF files contain fundamentally different types data.

  • Fasta files contain sequences, which could be chromosomes, assembled contigs, polypeptides, transcripts, or other biological sequences.
  • GTF (and GFF3 and BED) files contain intervals, indicating that some feature of interest occurs at such-and-such position on such-and-such sequence. A hypothetical example: a transcription factor binding site occurs on chromosome 2 from position 40011 to 40017.

So you are correct: it's not really helpful to think of your task in terms of "transforming" Fasta to GTF. The process of creating a GTF/GFF3/BED file is often called annotation. There are many different methods to annotate many different types of genomic features: transposable elements, segmental duplications, protein-coding genes, non-coding RNAs, and so on.

As a result, it's meaningless to say "I need a GTF file" without clearly specifying what that GTF file will annotate. (It's kind of like saying "I need an XML file" or "I need an Excel spreadsheet" without indicating what the contents of those files would be.) The things you need to clarify are:

  1. What will the intervals in my GTF file represent?
  2. What precise sequences will serve as the reference and provide interval coordinates for the GTF file?
  3. How are those intervals to be determined?

It sounds like 3. is a big part of your question. If I'm reading things correctly, you want to annotate a particular class of genes on an influenza genome. Is that correct? Did you perform de novo sequencing of influenza viruses, and now hope to characterize variation in their HA genes? Stating what you hope to get out of your analysis would be helpful in finding a good way forward.

$\endgroup$
2
  • 1
    $\begingroup$ Thank you for replying! I have updated my question to be more informative of what I want to accomplish. $\endgroup$
    – Lindsey
    Mar 5, 2019 at 18:02
  • $\begingroup$ If I was doing this analysis, I'd want to assess selection signal against domain boundaries. In a selection calculation its one approach to demarcate the loci. For example the hydrophobic "stem" (I don't know HA terminology) will not be of huge interest in this particular question, so could be delineated to provide a control $\endgroup$
    – M__
    Mar 7, 2019 at 13:39
1
$\begingroup$

Since you know that your sequences in your fastas are your genes of interest, why not just dummy up a gtf where every sequence is a gene?

The point of a gtf is to tell software which genomic regions matter for a certain procedure, and which regions do not. But if you already know that your sequences are pared down to genes, then you know that the whole thing is what's relevant.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.