Archive for the ‘Today`s Script’ Category

[Perl] FASTAQ To FASTA Converter

Codes to convert FASTAQ to FASTA format in Perl programming language

#/usr/bin/perl -w
use strict;

my $file;
my $fileOutput;
my $write=0;

$file = $ARGV[0];
$fileOutput = $ARGV[1];
open (IN, $file) or die “file can not open -$!”;
open OUTPUT, “>$fileOutput”;

while (my $line = )
    if($line =~ m/^\@/) {
      print OUTPUT “”
      .”>”. substr($line,1);
    } elsif ($write){
      print OUTPUT “”
      .$line. “\n”;

File1 is a subset of File2 ???

How to check whether file1 is a subset of file2?
Please try this command :
comm -23

Find any file containing specific string

How to find any file containing specific string?
Try this command :

find | xargs grep ’string’ -sl


In October, I got an invitation from Google to join an event held by GLIDE. What is GLIDE? GLIDE is abbreviation of Girls Leading in Development and Engineering. It was established in November 2011 at Japan as a community of women in computer science. The event was a workshop, but I think it was [...]

Are You a Programmer?

If you are a programmer, after finishing your code work today, please solve this case!!!

How long did you spend to solve it?
Are you a programmer

This image is taken from Hank`s wall image in his facebook account.

Naive code to calculate N50 in Perl

A critical stage in genome sequencing is the assembly of shotgun reads, or piecing together fragments randomly extracted from the sample, to form a set of contiguous sequences (contigs) representing the DNA in the sample [1]. N50 is one of the quality parametres of genome assembly. N50 indicates the scaffold/contigs length such that 50% of [...]