<?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=10</link>
	<atom:link href="https://bioinformaticsonline.com/snippets/owner/neelam?offset=10" rel="self" type="application/rss+xml" />
	<description><![CDATA[]]></description>
	
	<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/43793/count-number-of-lines-in-each-file-in-linux</guid>
	<pubDate>Fri, 18 Feb 2022 22:43:57 -0600</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/43793/count-number-of-lines-in-each-file-in-linux</link>
	<title><![CDATA[Count number of lines in each file in Linux !]]></title>
	<description><![CDATA[<code>for FILE in *.rd; do wc -l $FILE; done &gt; allReads.hits</code>]]></description>
	<dc:creator>Neel</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/43765/bash-script-to-split-multifasta-file</guid>
	<pubDate>Wed, 02 Feb 2022 03:53:30 -0600</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/43765/bash-script-to-split-multifasta-file</link>
	<title><![CDATA[Bash script to split multifasta file !]]></title>
	<description><![CDATA[<code>#Using awk, we can easily split a file (multi.fa) into chunks of size N (here, N=500), by using the following one-liner:

awk &#039;BEGIN {n=0;} /^&gt;/ {if(n%500==0){file=sprintf(&quot;chunk%d.fa&quot;,n);} print &gt;&gt; file; n++; next;} { print &gt;&gt; file; }&#039; &lt; multi.fa

#OR

awk -v chunksize=$(grep &quot;&gt;&quot; multi.fasta -c) &#039;BEGIN{n=0; chunksize=int(chunksize/10)+1 } /^&gt;/ {if(n%chunksize==0){file=sprintf(&quot;chunk%d.fa&quot;,n);} print &gt;&gt; file; n++; next;} { print &gt;&gt; file; }&#039; &lt; multi.fasta

#Another great solution is genome tools (gt), which you can find here: http://genometools.org/, which has the following simple command:

gt splitfasta -numfiles 10 multi.fasta</code>]]></description>
	<dc:creator>Neel</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/43409/inreractive-scp-file-transfer</guid>
	<pubDate>Tue, 28 Sep 2021 08:14:04 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/43409/inreractive-scp-file-transfer</link>
	<title><![CDATA[Inreractive SCP / File transfer !]]></title>
	<description><![CDATA[<code>#!/bin/bash
#next line prints hearer of script
echo &quot;Interactive Script to Copy File (files) / Directory using scp&quot;
#next line check if entered value is not null, and if null it will reask user to enter Destination Server
while [ x$desthost = &quot;x&quot; ]; do
#next line prints what userd should enter, and stores entered value to variable with name desthost
read -p &quot;Destination Server Name : &quot; desthost
#next line finishes while loop
done
#next line check if entered value is not null, and if null it will reask user to enter Destination Path
while [ x$destpath = &quot;x&quot; ]; do
#next line prints what userd should enter, and stores entered value to variable with name destpath
read -p &quot;Destination Path : &quot; destpath
#next line finishes while loop
done
#next line put null value to variable filename
filename=&#039;null&#039;
#next line check if entered value is null, and If not null it will reask user to enter file(s) to copy
while ! [ x&quot;$filename&quot; = &quot;x&quot; ]; do
#next line prints what userd should enter, and stores entered value to variable with name filename
read -p &quot;Path to source directory / file : &quot; filename
#next line checks if entered value is not null, and if not null it will copy file(s)
if ! [ x&quot;$filename&quot; = &quot;x&quot; ];
then
#next line prints header
echo -n &quot;Copying $filename ... &quot;
#next like copy pre-entered file(s) or dir to destination path on destination server
scp -r &quot;$filename&quot; &quot;$desthost&quot;:&quot;$destpath&quot;
#end of if
fi
#next line finishes while loop
done</code>]]></description>
	<dc:creator>Neel</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/43397/trim-the-reads-in-loop-using-trimmomatic</guid>
	<pubDate>Thu, 23 Sep 2021 13:13:38 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/43397/trim-the-reads-in-loop-using-trimmomatic</link>
	<title><![CDATA[Trim the reads in loop using Trimmomatic !]]></title>
	<description><![CDATA[<code>for infile in *_1.fastq.gz
do
   base=$(basename ${infile} _1.fastq.gz)
   trimmomatic PE ${infile} ${base}_2.fastq.gz \
                ${base}_1.trim.fastq.gz ${base}_1un.trim.fastq.gz \
                ${base}_2.trim.fastq.gz ${base}_2un.trim.fastq.gz \
                SLIDINGWINDOW:4:20 MINLEN:25 ILLUMINACLIP:NexteraPE-PE.fa:2:40:15 
done</code>]]></description>
	<dc:creator>Neel</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/43395/commands-to-remove-white-space-in-text-or-string-using-awk-and-sed-in-linux</guid>
	<pubDate>Wed, 22 Sep 2021 08:01:34 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/43395/commands-to-remove-white-space-in-text-or-string-using-awk-and-sed-in-linux</link>
	<title><![CDATA[Commands to Remove White Space In Text Or String Using Awk And Sed In Linux]]></title>
	<description><![CDATA[<code>text=&quot; ATGGTV AGTGACCTAGAGTGATGA G   GGRTTT&quot;

echo &quot;$text&quot; | sed &#039;s/ //g&#039;
OR
echo &quot;$text&quot; | awk &#039;{ gsub(/ /,&quot;&quot;); print }&#039;

Return: ATGGTVAGTGACCTAGAGTGATGAGGGRTTT

echo &quot;$text&quot; | sed &#039;s/^ //g&#039;

echo &quot;$text&quot; | sed &#039;s/ \$//g&#039;

#Multiple space
cat /tmp/test.txt | sed &#039;s/[ ]\+/ /g&#039;

echo &quot;$text1&quot; | awk &#039;{ gsub(/[ ]+/,&quot; &quot;); print }&#039;

cat /tmp/test.txt | awk &#039;{ gsub(/[ ]+/,&quot; &quot;); print }&#039;</code>]]></description>
	<dc:creator>Neel</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/43340/print-in-terminal-with-python</guid>
	<pubDate>Tue, 31 Aug 2021 03:48:58 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/43340/print-in-terminal-with-python</link>
	<title><![CDATA[Print in terminal with python !]]></title>
	<description><![CDATA[<code>#!/usr/bin/env python

import time
import curses

def pbar(window):
    height, width = window.getmaxyx()
    for i in range(10):
        window.addstr(height -1, 0, &quot;[&quot; + (&quot;=&quot; * i) + &quot;&gt;&quot; + (&quot; &quot; * (10 - i )) + &quot;]&quot;)
        window.refresh()
        time.sleep(0.5)

curses.wrapper(pbar)</code>]]></description>
	<dc:creator>Neel</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/43333/install-jellyfish-on-linux</guid>
	<pubDate>Sat, 28 Aug 2021 02:32:55 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/43333/install-jellyfish-on-linux</link>
	<title><![CDATA[Install Jellyfish on Linux !]]></title>
	<description><![CDATA[<code>Lenovo-ideapad-320-15ISK:~/Downloads/MyTools/$ sudo apt install jellyfish  
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.15.0-144 linux-headers-4.15.0-144-generic linux-headers-4.15.0-147 linux-headers-4.15.0-147-generic linux-headers-4.15.0-151 linux-headers-4.15.0-151-generic linux-image-4.15.0-144-generic
  linux-image-4.15.0-147-generic linux-image-4.15.0-151-generic linux-modules-4.15.0-144-generic linux-modules-4.15.0-147-generic linux-modules-4.15.0-151-generic linux-modules-extra-4.15.0-144-generic
  linux-modules-extra-4.15.0-147-generic linux-modules-extra-4.15.0-151-generic
Use &#039;sudo apt autoremove&#039; to remove them.
The following additional packages will be installed:
  libjellyfish-2.0-2
The following NEW packages will be installed:
  jellyfish libjellyfish-2.0-2
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 418 kB of archives.
After this operation, 808 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://in.archive.ubuntu.com/ubuntu bionic/universe amd64 libjellyfish-2.0-2 amd64 2.2.8-3build1 [60.7 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu bionic/universe amd64 jellyfish amd64 2.2.8-3build1 [358 kB]
Fetched 418 kB in 1s (429 kB/s)    
Selecting previously unselected package libjellyfish-2.0-2:amd64.
(Reading database ... 329798 files and directories currently installed.)
Preparing to unpack .../libjellyfish-2.0-2_2.2.8-3build1_amd64.deb ...
Unpacking libjellyfish-2.0-2:amd64 (2.2.8-3build1) ...
Selecting previously unselected package jellyfish.
Preparing to unpack .../jellyfish_2.2.8-3build1_amd64.deb ...
Unpacking jellyfish (2.2.8-3build1) ...
Setting up libjellyfish-2.0-2:amd64 (2.2.8-3build1) ...
Setting up jellyfish (2.2.8-3build1) ...
Processing triggers for libc-bin (2.27-3ubuntu1.4) ...
Processing triggers for doc-base (0.10.8) ...
Processing 1 added doc-base file...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...</code>]]></description>
	<dc:creator>Neel</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/43253/perl-onliner-to-print-fasta-headers</guid>
	<pubDate>Fri, 13 Aug 2021 07:35:49 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/43253/perl-onliner-to-print-fasta-headers</link>
	<title><![CDATA[Perl onliner to print fasta headers !]]></title>
	<description><![CDATA[<code>#Save all your fasta in seq.fa and run the following ...

perl -ne &#039;print if /^&gt;/&#039; seq.fa

#Print header with line number

perl -ne &#039;print &quot;$. $_&quot; if /^&gt;/ &#039; seq.fa</code>]]></description>
	<dc:creator>Neel</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/43252/commandline-to-extract-a-list-of-specific-read-ids-from-a-bam-file</guid>
	<pubDate>Fri, 13 Aug 2021 07:30:15 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/43252/commandline-to-extract-a-list-of-specific-read-ids-from-a-bam-file</link>
	<title><![CDATA[Commandline to Extract a list of specific read IDs from a bam file]]></title>
	<description><![CDATA[<code>#Save all the IDs in IDs.txt file

#Run it on BAM file

samtools view file.bam | fgrep -w -f IDs.txt</code>]]></description>
	<dc:creator>Neel</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/43100/install-seqwish-using-conda</guid>
	<pubDate>Thu, 24 Jun 2021 04:44:39 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/43100/install-seqwish-using-conda</link>
	<title><![CDATA[Install seqwish using conda !]]></title>
	<description><![CDATA[<code>conda install -c bioconda seqwish 
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/anaconda3/envs/jitENV

  added / updated specs:
    - seqwish


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    seqwish-0.4.1              |       h2e03b76_1         4.6 MB  bioconda
    ------------------------------------------------------------
                                           Total:         4.6 MB

The following NEW packages will be INSTALLED:

  seqwish            bioconda/linux-64::seqwish-0.4.1-h2e03b76_1


Proceed ([y]/n)? y


Downloading and Extracting Packages
seqwish-0.4.1        | 4.6 MB    | ################################################################################################################################################################################### | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: done</code>]]></description>
	<dc:creator>Neel</dc:creator>
</item>

</channel>
</rss>