2NDSCORE(1)

✨ NAME ✨

okay so this is 2NDSCORE(1) from the User Contributed Documentation πŸ“š and it's 2ndscore, which is lowkey iconic because it finds the best hairpin anchored at each position πŸ’–πŸ§š

πŸŽ€ SYNOPSIS πŸŽ€

2ndscore in.fasta > out.hairpins

πŸ¦‹ DESCRIPTION πŸ¦‹

bestie, for every position in the sequence, it spits out a line that looks like this πŸ‘€βœ¨

          -0.6  52 ..  62      TTCCTAAAGGTTCCA  GCG CAAAA TGC  CATAAGCACCACATT
        (score) (start .. end) (left context)   (hairpin)      (right contenxt)

Near the ends of the sequences, the context can get padded with x characters πŸ™ˆ. If no hairpin can be found, the score just says None πŸ’€, so don't panic.

Multiple fasta files work, and each file can hold multiple sequences too 🌈. The output for each sequence gets separated by a line that starts with > and has the FASTA description of that sequence in it 🫢.

Okay, the vibe here is that the plus strand and minus strand can have different hairpin scores, and that's because of GU binding in RNA 😭. So by default, 2ndscore gives you two sets of hairpins for every sequence: the FORWARD hairpins first, then the REVERSE hairpins πŸ’…. The forward ones are identified by having the word FORWARD at the end of the > line right before them, and the reverse ones come after a > line ending with REVERSE. If you only want one strand, you can use:

  • --no-fwd β€” don't print the FORWARD hairpins πŸ™…
  • --no-rvs β€” don't print the REVERSE hairpins πŸ™…

You can set the energy function, just like with transterm, using the --gc, --au, --gu, --mm, and --gap options πŸ”₯. The --min-loop, --max-loop, and --max-len options are also supported ✨.

🧚 FORMAT OF THE .BAG FILES 🧚

The columns for the .bag files go in this order, no cap 🌸

  1. gene_name
  2. terminator_start
  3. terminator_end
  4. hairpin_score
  5. tail_score
  6. terminator_sequence
  7. terminator_confidence β€” a combo of the hairpin and tail score that takes into account how likely those scores are in a random sequence. This is the main "score" for the terminator, and it's computed as described in the paper πŸ‘‘
  8. APPROXIMATE_distance_from_end_of_gene β€” the approximate number of base pairs between the end of the gene and the start of the terminator. It's approximate in a few ways πŸ₯Ή. First (and most important), TransTermHP doesn't always use the real gene ends. Depending on the options you give it, it may trim some off the ends of genes to handle terminators that partially overlap with genes. Second, where the terminator "begins" isn't that well defined. This field is intended only for a sanity check, so terminators reported to be the best near the ends of genes shouldn't be _too far_ from the end of the gene 🧐

🌸 USING TRANSTERM WITHOUT GENOME ANNOTATIONS 🌸

Main character moment: TransTermHP only uses known gene info for 3 things πŸ’–: (1) tagging the putative terminators as either "inside genes" or "intergenic," (2) choosing the background GC-content percentage to compute the scores, because genes often have different GC content than intergenic regions, and (3) producing slightly more readable output. Items (1) and (3) are not really necessary, and (2) has no effect if your genes have about the same GC-content as your intergenic regions 🫧

Unfortunately, TransTermHP doesn't yet have a simple option to run without an annotation file (either .ptt or .coords), and it requires at least 2 genes to be present 😀. The solution is to create fake, small genes that flank each chromosome. To do this, make a fake.coords file that contains only these two lines:

               fakegene1       1 2     chome_id
               fakegene2       L-1 L   chrom_id

Where L is the length of the input sequence, and L-1 is 1 less than the length of the input sequence. chrom_id should be the word directly following the > in the .fasta file containing your sequence. (If, for example, your .fasta file began with >seq1, then chrom_id = seq1.) 🧠

This creates a "fake" annotation with two 1-base-long genes flanking the sequence in a tail-to-tail arrangement: --> <-- πŸ¦‹. TransTermHP can then be run with:

        transterm -p expterm.dat sequence.fasta fake.coords

If the G/C content of your intergenic regions is about the same as your genes, then this won't have too much of an effect on the scores terminators receive. On the other hand, this use of TransTermHP hasn't been tested much at all, so it's hard to vouch for its accuracy πŸ™ˆ

⚠️ Heads up, bestie: this workaround hasn't been tested much at all, so it's hard to vouch for its accuracy πŸ’€

πŸ’… SEE ALSO πŸ’…


Bye bestie! πŸ¦‹πŸ’– This page is 2NDSCORE(1) from User Contributed Documentation, dated 2011-02-19 ✨ iykyk πŸ’œ