Next Generation Sequencing
(NGS) has really taken off the last few years, as both devices and the
cost of experiments have dramatically declined. NGS decipher the
identity (base composition, the sequence of letters in the alphabet of
DNA and RNA) of nucleic acids and return the results in the fastq open data format. Fastq
files are flat text files with a standardized layout: each molecule
present in the sample that is captured by the sequencer is represented
with four fields:
a '@' character and is followed by a sequence identifier and an optional description
one (typically) or more lines of characters in the four letter alphabet of nucleic acids
a metadata field starting with the "+" optionally followed by the
same sequence identifier and description as in the first field
one, or more lines of the quality of each symbol sequence reported in field 2
An example of such a four field entry may look something like this
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on April 21, 2024 at 23:59). This blog post provides some solutions to this challenge. Please don’t read on if you intend to complete the challenge on your own.
Task 1: 33% Appearance
You are given an array of integers, @ints.
Write a script to find an integer in the given array that appeared 33% or more. If more than one found, return the smallest. If none found then return undef.
I noticed the other day we had an old utility script txt2html.pl that gave a warning
/usr/local/bin/txt2html.pl $* is no longer supported at /usr/local/bin/txt2html.pl line 1512.
Apparently $*=1 was how multi-line regex searching was done in old perls.
which gives us /usr/local/bin/txt2html, then mv'd the old txt2html.pl to txt2html.pl.orig and used ln -s to symlink txt2html.pl to point at /usr/local/bin/txt2html.
Module::CoreList is still somewhat awkward and manual to update around releases. We need better instructions and possibly some automation around the simpler
Pod’s new U<> format needs more documentation around its limited availability.
Test2::Suite sometimes spuriously fails in perl core; needs some poking
We should put out a call for bugfixes for a possible 5.38.1 release
I have been leaning very heavily on Perl's prototype feature for creating new modules. The imptetus for this can traced back to the day I looked at the source code for Try::Tiny, and realized that it was implemented using prototypes. The main reason for using prototypes for many new modules I've created recently is my focus on making a thing I do repeatedly available in a more Perlish or idiomatic way.
The following article demonstrates 2 CPAN modules I have written that focus more on Perl programmer UX and why Perl prototypes can provide a way forward for a great many ideas that people have. Prototypes misunderstood, yes; but more so, they are misunderestimated. They are infact, very powerful and when used for their intended purpose; a lot of hand wringing can be avoided during feature discussions.
Please note that Komodo IDE is now open source.
Komodo IDE is a very feature-rich Integrated Development Environment (IDE). Basically a sophisticated source-code editor.
Notable features why I used Komodo IDE:
The blog post announcing Komodo IDE going Open Source is here.
The blog post also contains an explanation why it is made open source. One of the reasons is that there is already a lot of free and good editors available, e.g. Visual Studio Code. Though, as I was using Komodo IDE for at least 7 years now, I still very much like it and it’s OOTB feature set.
Hi everybody! In this week's weekly challenge, we're searching for anything but the minimum or maximum in a dataset, and searching for senior citizens on a plane.
Min And Max
This challenge is a very interesting one, because obviously the easiest solution in terms of development is to sort and filter the first and last element. However, that is O(n log n) and it's very little added complexity to do the O(n) solution with a single-pass filter.
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on August 27, 2023 at 23:59). This blog post offers some solutions to this challenge. Please don’t read on if you intend to complete the challenge on your own.
Task 2: Senior Citizens
You are given a list of passenger details in the form “9999999999A1122”, where 9 denotes the phone number, A the sex, 1 the age and 2 the seat number.
Write a script to return the count of all senior citizens (age >= 60).
Example 1
Input: @list = ("7868190130M7522","5303914400F9211","9273338290F4010")
Ouput: 2
The age of the passengers in the given list are 75, 92 and 40.
So we have only 2 senior citizens.
DBD::SQLite 1.73_01 (with SQLite 3.42.0) is a release candidate for the next stable DBD::SQLite. This release is mainly to upgrade the bundled SQLite library.
I'll wait for about a month and release 1.74 in the middel of September if there's no blocker nor request to wait for more. Thank you for your patience.
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on April 14, 2024 at 23:59). This blog post provides some solutions to this challenge. Please don’t read on if you intend to complete the challenge on your own.
Task 2: Target Array
You are given two arrays of integers, @source and @indices. The @indices can only contains integers 0 <= i < size of @source.
Write a script to create target array by insert at index $indices[i] the value $source[i].
At the recent YAPC::EU (still running) I gave a talk about my latest CPAN module: Graphics::Toolkit::Color (in short GTC - v1.53). It went a little out of hand and even worse: some of the key thoughts I did not formulate as clear as wanted. That is why I use this channel to correct that. In this first part I outline the goal of the module and the next part will be about the design principles of the public API, moving than into implementation details and the general issues when dealing with colors.
Resource::Silo is a declarative lazy resource container library for Perl. It allows to declare resources such as configuration files, database connections, external service endpoints, and so on, in one place; acquire them on demand; cache them; and release in due order.
It may also be described as the single source of truth for the application's side effects.
For those unfamiliar with Bread::Board:
Hey, hey, hey, hey! A shiny new solution just arrived!
declare all of your application's resources / dependencies in one place using a simple DSL;
instantiate them on demand and only once, with little overhead;
override them with mocks in your tests & guard against unexpected side effects;
gain more fine-grained control via the ctl frontend.
Today was PSC 111 — what happened to 110 you ask? Well, it was a bit of a non-meeting a few weeks ago. Nothing to say about it, sorry!
This week, we:
Said hello to Graham and goodbye to Rik
We did a bunch of handover, making sure we set up a new Zoom meeting and calendar, and talking about our usual order of business
In more normal business, we:
talked about the future of use vX, especially related to builtin:: stuff — do we want “use v5.40” to import “builtin::refaddr” for example
talked about what we’re going to do with the UNIVERSAL::import changes so we can move it forward toward someday making it fatal but without breaking half of CPAN at once
Spoiler Alert: This weekly challenge deadline is due in a few days from now (on April 14, 2024 at 23:59). This blog post provides some solutions to this challenge. Please don’t read on if you intend to complete the challenge on your own.
Task 1: Greatest English Letter
You are given a string, $str, made up of only alphabetic characters [a..zA..Z].
Write a script to return the greatest english letter in the given string.
A letter is greatest if it occurs as lower and upper case. Also letter ‘b’ is greater than ‘a’ if ‘b’ appears after ‘a’ in the English alphabet.
Once again I'm writing about a TPRC talk instead of a weekly challenge project, but that's because I feel it's a very important topic to be aware of both inside and outside our community as Perl programmers. Sawyer X gave a really great talk about the abuse he personally experienced as a member of the Perl community. I've never experienced abuse in this or any other technology community, but I have experienced abuse before in other contexts. Also, as a disclaimer, although I'm sure many have seen some of Sawyer's situation play out in public, I haven't, as I believe it happened during my extended break from Perl and development in general.