<?xml version='1.0'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:atom="http://www.w3.org/2005/Atom" >
<channel>
	<title><![CDATA[BOL: Owner]]></title>
	<link>https://bioinformaticsonline.com/snippets/owner/neelam?offset=40</link>
	<atom:link href="https://bioinformaticsonline.com/snippets/owner/neelam?offset=40" rel="self" type="application/rss+xml" />
	<description><![CDATA[]]></description>
	
	<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/35994/perl-script-to-find-missing-and-move-to-desire-folder</guid>
	<pubDate>Mon, 19 Mar 2018 12:35:54 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/35994/perl-script-to-find-missing-and-move-to-desire-folder</link>
	<title><![CDATA[Perl script to find missing and move to desire folder]]></title>
	<description><![CDATA[<code>#!/usr/bin/perl -w
use strict;
use warnings;
open(my $ids,  &quot;&lt;&quot;,  &quot;$ARGV[0]&quot;)  or die &quot;Can&#039;t open input.txt: $!&quot;;
while (&lt;$ids&gt;) {
chomp;
next if $_ =~ /^\s*$/;
my $id = $_;
	open(my $val,  &quot;&lt;&quot;,  &quot;$ARGV[1]&quot;)  or die &quot;Can&#039;t open input.txt: $!&quot;;

	while (&lt;$val&gt;)  {
	chomp;
	if (/$id/) {
	  print &quot;found string $id\n&quot;;
	system (&quot;cp $_ 2move&quot;); 
	}

}


}</code>]]></description>
	<dc:creator>Neel</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/35993/perl-script-to-extract-the-uniq-ids</guid>
	<pubDate>Mon, 19 Mar 2018 12:34:19 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/35993/perl-script-to-extract-the-uniq-ids</link>
	<title><![CDATA[Perl script to extract the uniq Ids]]></title>
	<description><![CDATA[<code>#!/usr/bin/perl -w
use strict;
use warnings;
use List::Uniq &#039;:all&#039;;

open(my $val,  &quot;&lt;&quot;,  &quot;$ARGV[0]&quot;)  or die &quot;Can&#039;t open input.txt: $!&quot;;
my @allMissed;
while (&lt;$val&gt;)  {
chomp;
my $flag=0;
next if $_ =~ /^\s*$/;
my $string = &quot;$_&quot;;

open(my $file,  &quot;&lt;&quot;,  &quot;$ARGV[1]&quot;)  or die &quot;Can&#039;t open input.txt: $!&quot;;
while (&lt;$file&gt;)  {
	chomp;
	if (/$string/) {
	  #print &quot;$string\n&quot;; 
	$flag=1;
	}
}
close $file;
	if ($flag == 0) {
	push @allMissed, $string;
	}
}

close $val;

my @allRemaining = uniq (@allMissed);
foreach (@allRemaining) { print &quot;$_\n&quot;;}

__END__</code>]]></description>
	<dc:creator>Neel</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/34046/extract-the-fastq-sequence-with-range-in-perl</guid>
	<pubDate>Wed, 02 Aug 2017 04:29:06 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/34046/extract-the-fastq-sequence-with-range-in-perl</link>
	<title><![CDATA[Extract the fastq sequence with range in Perl]]></title>
	<description><![CDATA[<code>use Bio::DB::Fasta;
open(POSITIONS,&quot;positions.txt&quot;);
while(&lt;POSITIONS&gt;){
    chomp;
    my ($seqName,$begin,$end) = split(/\s/);
    my $db = Bio::DB::Fasta-&gt;new(&#039;allGenomeContacted.fa&#039;);
	my $seq = $db-&gt;seq(&quot;$seqName&quot;, $begin =&gt; $end);
	print &quot;$seq\n&quot;;
}
close(POSITIONS);</code>]]></description>
	<dc:creator>Neel</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/33843/construct-a-heatmap-with-perl</guid>
	<pubDate>Fri, 07 Jul 2017 04:35:13 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/33843/construct-a-heatmap-with-perl</link>
	<title><![CDATA[Construct a heatmap with perl]]></title>
	<description><![CDATA[<code>#!/bin/env perl
use strict;
use warnings;

use Imager::Heatmap;

my $hmap = Imager::Heatmap-&gt;new(
    xsize  =&gt; 640,        # Image width
    ysize  =&gt; 480,        # Image height
    xsigma =&gt; 10,         # Sigma value of X-direction
    ysigma =&gt; 10,         # Sigma value of Y-direction
);

# @point_datas should be: ( [ x1, y1, weight1 ], [ x2, y2, weight2 ] ... )
my @point_datas = ( [ 10, 20, 50 ], [ 20, 40, 70 ] );

# Add point datas to construct density matrix
$hmap-&gt;insert_datas(@point_datas); 

# After adding datas, get heatmap as Imager instance.
my $img = $hmap-&gt;draw;

# create png file in current directory
$img-&gt;write( file =&gt; &#039;./hm.png&#039; );</code>]]></description>
	<dc:creator>Neel</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/28282/perl-script-introduces-control-structures-arrays-and-hashes</guid>
	<pubDate>Mon, 04 Jul 2016 08:42:47 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/28282/perl-script-introduces-control-structures-arrays-and-hashes</link>
	<title><![CDATA[Perl script introduces control structures, arrays and hashes.]]></title>
	<description><![CDATA[<code>#!/usr/bin/env perl

use strict;
use warnings;

my @first_array = (&#039;DNA&#039;, &#039;ATGCGTGC&#039;, 5, &#039;RNA&#039;, &#039;AUGC&#039;);
print $first_array[0], &quot;\n\n&quot;;

# Scalar gives actual size of an array

my $size_of_array = scalar(@first_array);
my $another_way_of_getting_size_of_array = @first_array; # implicit way
print &quot;Scalar of array: $size_of_array\n\n&quot;;
print &quot;Perl&#039;s index size of array: $#first_array\n\n&quot;;
print &quot;Another way of getting size: $another_way_of_getting_size_of_array\n\n&quot;;

# Control Loop: for

for (my $i=0; $i&lt;=$#first_array; $i++) {
    print &quot;Perl&#039;s array index: $i\n\n&quot;;
    print &quot;$first_array[$i] \n\n&quot;; 
}

my %sequence = (&#039;DNA&#039; =&gt; &#039;ATCGATGCT&#039;,
                &#039;RNA&#039; =&gt; &#039;AUGC&#039;,
                &#039;Number of seqs&#039; =&gt; 2
                );

print $sequence{&#039;DNA&#039;}, &quot;\n&quot;;
# Control Loop: foreach

foreach my $key (sort (keys %sequence)) {
    print &quot;Key of hash is $key\tValue of hash is $sequence{$key}\n\n&quot;;
}</code>]]></description>
	<dc:creator>Neel</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/28193/perl-subroutine-to-read-and-write-files</guid>
	<pubDate>Thu, 30 Jun 2016 16:48:55 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/28193/perl-subroutine-to-read-and-write-files</link>
	<title><![CDATA[Perl subroutine to read and write files]]></title>
	<description><![CDATA[<code># Input output (InOut) the file
# usage:
# @array  = InOut(&#039;read&#039;,$file)
# $string = InOut(&#039;read&#039;,$file)
# InOut(&#039;write&#039;,$file,\$string)
# InOut(&#039;write&#039;,$file,\@array)
#$string = &quot;YO!&quot;;
#InOut(&#039;write&#039;,&#039;file.txt&#039;,\$string);

sub InOut {
my($bit,$file,$data) = @_;

if($bit eq &#039;read&#039;){
    open InOut,&quot;&lt; $file&quot; or die &quot;Cannot open $file for input: $!\n&quot;;
    my @file = &lt;InOut&gt;;
    close InOut;
    return wantarray ? @file :  join &#039;&#039;, @file;
    }
if($bit eq &#039;write&#039;){
    open  InOut,&quot;&gt; $file&quot; or die &quot;Cannot open $file for output: $!\n&quot;;
    print InOut  ref $data eq &#039;ARRAY&#039; ? @$data : ref $data eq &quot;SCALAR&quot;? $$data : &#039;&#039;;
    close InOut;
    }
}</code>]]></description>
	<dc:creator>Neel</dc:creator>
</item>

</channel>
</rss>