Cleaning up with sed 2

I have a list of nucleotide sequences in fasta format, obtained from NCBI. I want to clean the sequences names, leaving only the accession numbers. Additionally, I want to extract the accession numbers to a separate list. I am not that familiar with sed, since I use it mainly in my SlackBuilds to fix small things. Therefore, for my fuuture reference, I decided to sum things up.
Read the rest of this entry »


Cleaning up with sed

I needed to clean up some plain text files from data and characters I did not want.

To be more precise, I have a phylogenetic tree, obtained from the TimeTree web-site. Species presented there are mainly birds, several reptiles and a fish. The tree has branches length information and node labels, which I wanted to remove.
Read the rest of this entry »


Making a patch

I usually fix the SlackBuilds I maintain by sed, as it makes things much more transparent. However, sed is not always an option, especially for some big fixes or fixes that contain “weird” characters, for example something like this:

unless (defined(@$slist) && defined($hlist_sel)) {

The above is an excerpt from perlprimer.pl, that had to be fixed. The problem in question has been discussed here. I wanted to provide a fix for my perlprimer.SlackBuild, therefore I decided to make a patch.
Read the rest of this entry »