Autarchy of the Private Cave

Tiny bits of bioinformatics, [web-]programming etc

    • Archives

    • Recent comments

    Archive for the 'Software' Category

    How to: enable metadata duplication on an existing btrfs filesystem

    30th December 2016

    Just one command: sudo btrfs balance start -v -mconvert=dup /toplevel/
    where /toplevel/ is your mountpoint of the btrfs root, -v is there for verbosity (not too verbose, don’t worry), and -mconvert=dup literally says act on metadata only, convert data profile to DUP.

    This will duplicate both metadata and btrfs system data.
    Verify with: sudo btrfs fi df /toplevel:

    Data, single: total=10.00GiB, used=3.88GiB
    System, DUP: total=64.00MiB, used=4.00KiB
    Metadata, DUP: total=512.00MiB, used=286.18MiB
    GlobalReserve, single: total=96.00MiB, used=0.00B

    Explanation: on SSDs, mkfs.btrfs creates metadata in single mode (because of widely spread SSD deduplication algorithms negating duplicate entries). However, second copy of metadata increases recovery chances, especially so if your SSD does not deduplicate writes. Hence the desire to add metadata/systemdata duplication after the filesystem is created.

    Share

    Posted in *nix, how-to, Notepad, Software | No Comments »

    Mail-in-a-box, Sovereign, Modoboa, iRedMail, etc

    28th December 2016

    Preparing to dismantle my physical server (and move different hosted things to one or more VPS),
    I’ve realized that an email server is necessary: to send website-generated emails, and also
    receive a few rare contact requests arriving at the websites.

    My current email server was configured eons ago, it works well,
    but I have no desire to painfully transfer all the configuration…
    Better install something new, shiny and exciting, right? :)

    I had 3 #self-hosted, #mail-server bookmarks:

    (Sovereign, the 4th one, was addded after reading more about Mail-in-a-box.)

    Here are my notes on what seemed important about these 4.
    Read the rest of this entry »

    Share

    Posted in *nix, Comparison, Links, Notepad, Software, Web | No Comments »

    TSW-friendly task and note management software

    5th June 2016

    A while ago I was looking for GTD/TSW-compatible android app.
    I ended up using Trello, Keep, and Calendar.

    But I always keep looking for new/improved tools, as right now I feel the best one does not exist…
    (If the best one can exist at all – requirements and conditions change all the time, so there is no fixed perfect immovable target.)

    I have been contemplating trying out the TSW methodology, but neither Keep nor Trello are quite there yet.
    I ended up using Evernote; after recent management changes and actually trying to become profitable it may as well last long enough.

    Everything was fine and calm until I have found workflowy yesterday.
    In essence, it is very similar to the text-file-based system that I have been using for at least half a year.

    Briefly, it is a web-based text editor on steroids, with possibly infinite nesting lists and seemingly full keyboard shortcuts control – no mouse needed.
    I recommend that you try the demo – it seems to be fully functional, and there is no need to sign up.

    This discovery made me read through pages and pages of this class of software tools.
    Here is a very brief summary of my findings: Read the rest of this entry »

    Share

    Posted in Links, Misc, Notepad, Software | No Comments »

    Evernote web-interface beta: how to fix: saved searches are crossed out and do not work

    9th May 2016

    Another symptom is a message along the lines of

    the notebook you are searching in has been moved or renamed since the saved search was created

    (which is not true).

    I had this problem, and found a solution.

    Go to your Evernote on a client where you can edit saved searches (Windows for me),
    edit all the searches, and make sure that notebook name is quoted in the search (and also, possibly, with all proper letter cases).

    I found this solution by first creating a search from the web-beta interface, it looked like this: notebook:"Mynotebook" tag:1-now
    All the crossed-out searches (despite working totally fine on Windows) looked like this: notebook:Mynotebook tag:1-now
    or even like this (note the lower-case 1st letter of the notebook name): notebook:mynotebook tag:1-now.

    After editing saved searches and synchronizing, they all appear (and work) just fine in the beta web-interface.

    If you cannot edit your searches right now, there is another workaround: all the saved searches work fine for me from the Shortcuts menu (a star in the left panel).

    Hope this helps!

    Share

    Posted in how-to, Notepad, Software, Web | No Comments »

    How to: export only notes to PDF from LibreOffice Impress 5

    28th February 2016

    If you want to export Notes to a PDF from LibreOffice Impress 5,
    and dutifully set the appropriate checkbox in PDF export dialog,
    then you will get all slides twice: first just all the slides as with usual PDF export, and then all the Notes pages.

    There is an easy solution to get Notes-only without editing the PDF.

    If you have a PDf printer installed (most Linux distributions, and Windows 10), just do File -> Print from Impress,
    then under the Print sub-header choose Notes from the Document drop-down (see picture).
    Make sure to set the proper paper format for the PDF printer (A4 in my case).
    Then print, and save the resulting PDF.
    Read the rest of this entry »

    Share

    Posted in how-to, Notepad, Software | No Comments »

    How to use mkfifo named pipes with prinseq-lite.pl

    24th February 2016

    prinseq_logo_1prinseq-lite.pl is a utility written in Perl for preprocessing NGS reads, also in FASTQ format.
    It can read sequences both from files and from stdin (if you only have 1 sequence).

    I wanted to use it with compressed (gzipped/bzipped2) FASTQ input files.
    As I do not need to store decompressed input files, the most efficient solution is to use pipes.
    This works well for a single file, but not for 2 files (paired-end reads).

    For 2 files, named pipes (also known as FIFOs) can be used.
    You can create a named pipe in Linux with the help of mkfifo command, for example mkfifo R1_decompressed.fastq.
    To use it, start decompressing something into it (either in a different terminal, or in background), for example zcat R1.fastq.gz > R1_decompressed.fastq &;
    we can call this a writing/generating process, because it writes into a pipe.
    (If you are writing software to use named pipes, any processes writing into them should be started in a new thread, as they will block until all the data is consumed.)
    Now if you give the R1_decompressed.fastq as a file argument to some other program, it will see decompressed content (e.g. wc -l R1_decompressed.fastq will tell you the number of lines in the decompressed file); we can call program reading from the named pipe a reading/consuming process.
    As soon as a consuming process had consumed (read) all of the data, the writing/generating process will finally exit.

    This, however, does not work with prinseq-lite.pl (version 0.20.4 or earlier), with a broken pipe error. Read the rest of this entry »

    Share

    Posted in *nix, Bioinformatics, Software | No Comments »

    PGF vs PNG vs JPEG 2000 for long-term photo storage/archive

    26th May 2015

    I am using an excellent photo-management suite digiKam, which offers 3 lossless compressed formats for photos versioning and storage: PNG, JPEG 2000, and PGF. I wanted to know which one should I use, which urged me to perform this comparison.

    This post is not intended to be an in-depth comparison, but should be sufficient to choose one of the three file formats for your purposes. For more format details and history simply follow the links provided. File formats are reviewed roughly in “historical” order.

    PNG (Portable Network Graphics) was designed as GIF replacement.

    • It is lossless.
    • It is suitable for photos.
    • PNG is more space-efficient in the case of images with many pixels of the same color, such as diagrams/plots (as compared to PGF and JPEG2000). However, PNG photos are almost always larger than lossless PGF/JPEG2000 photos (real photo example: 9.9 MB in PNG, 7.0 MB in JPEG 2000).
    • PNG is fairly fast at (en|de)coding.
    • PNG is widely supported by web-browsers, image editors, and other software.
    • PNG uses CRCs internally for each data block, so if damage occurs only the damaged block(s) should be lost – theoretically. However, in practice, according to the Just One Bit paper (local copy), PNG is actually much less damage-resilient than JPEG 2000.

    Read the rest of this entry »

    Share

    Posted in Comparison, Links, Misc, Software | No Comments »