<?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: All]]></title>
	<link>https://bioinformaticsonline.com/snippets?offset=60</link>
	<atom:link href="https://bioinformaticsonline.com/snippets?offset=60" rel="self" type="application/rss+xml" />
	<description><![CDATA[]]></description>
	
	<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/43845/bash-script-to-convert-multiline-fasta-to-single-line-fasta</guid>
	<pubDate>Thu, 31 Mar 2022 03:50:05 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/43845/bash-script-to-convert-multiline-fasta-to-single-line-fasta</link>
	<title><![CDATA[Bash script to convert multiline fasta to single line fasta !]]></title>
	<description><![CDATA[<code>#file.fa is multiline fasta

awk &#039;/^&gt;/ {printf(&quot;\n%s\n&quot;,$0);next; } { printf(&quot;%s&quot;,$0);}  END {printf(&quot;\n&quot;);}&#039; &lt; file.fa</code>]]></description>
	<dc:creator>Neel</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/43842/bash-command-to-explore-assembly-summary-genbank</guid>
	<pubDate>Tue, 29 Mar 2022 02:35:30 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/43842/bash-command-to-explore-assembly-summary-genbank</link>
	<title><![CDATA[Bash command to explore assembly summary genbank !]]></title>
	<description><![CDATA[<code>wget https://ftp.ncbi.nlm.nih.gov/genomes/genbank/assembly_summary_genbank.txt

pip3 install csvkit

csvcut -t -K 1 -c &#039;excluded_from_refseq&#039; assembly_summary_genbank.txt \
  | tail -n +2 | tr &quot;;&quot; &quot;\n&quot; \
    | sed -e &#039;s/^ //&#039; -e &#039;s/ $//&#039; | grep -v &#039;&quot;&quot;&#039; \
      | sort | uniq -c | sort -nr</code>]]></description>
	<dc:creator>Neel</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/43835/commands-to-find-and-replace-in-files0</guid>
	<pubDate>Sun, 27 Mar 2022 21:52:23 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/43835/commands-to-find-and-replace-in-files0</link>
	<title><![CDATA[Commands to Find and replace in file(s0) !]]></title>
	<description><![CDATA[<code>#Use SED
sed -i &#039;s/my/your/g&#039; test.txt test2.txt test3.txt

#Use FIND and SED
find . -name *.txt -exec sed -i &#039;s/my/your/g&#039; {} \;

#Use AWK
awk &#039;{sub(/{OLD_TERM}/,{NEW_TERM}); print}&#039; {file}
awk &#039;{sub(/my/,your); print}&#039; test.txt
awk &#039;{gsub(/i/,&quot;a&quot;); print}&#039; test.txt</code>]]></description>
	<dc:creator>Jit</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/43830/bash-script-to-find-difference-between-two-files</guid>
	<pubDate>Thu, 24 Mar 2022 20:15:38 -0500</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/43830/bash-script-to-find-difference-between-two-files</link>
	<title><![CDATA[Bash script to find difference between two files !]]></title>
	<description><![CDATA[<code>#lines which are exist only in file2:

grep -Fxvf file1 file2 &gt; file3

#lines which are exist only in file1:

grep -Fxvf file2 file1 &gt; file3

#lines which are exist in both files:

grep -Fxf file1 file2 &gt; file3</code>]]></description>
	<dc:creator>Rahul Nayak</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/43824/update-conda</guid>
	<pubDate>Sat, 12 Mar 2022 07:33:25 -0600</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/43824/update-conda</link>
	<title><![CDATA[Update conda !]]></title>
	<description><![CDATA[<code>(base) [me@hn1 ME]$ conda update conda
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/me/anaconda3

  added / updated specs:
    - conda


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    coreutils-8.32             |       h7b6447c_0         2.6 MB
    gawk-5.1.0                 |       h7b6447c_0        1007 KB
    libdeflate-1.8             |       h7f8727e_5          51 KB
    xmltodict-0.12.0           |     pyhd3eb1b0_0          13 KB
    ------------------------------------------------------------
                                           Total:         3.7 MB

The following packages will be REMOVED:

  entrez-direct-15.6-he881be0_1
  perl-archive-tar-2.32-pl526_0
  perl-carp-1.38-pl526_3
  perl-common-sense-3.74-pl526_2
  perl-compress-raw-bzip2-2.087-pl526he1b5a44_0
  perl-compress-raw-zlib-2.087-pl526hc9558a2_0
  perl-exporter-5.72-pl526_1
  perl-exporter-tiny-1.002001-pl526_0
  perl-extutils-makemaker-7.36-pl526_1
  perl-io-compress-2.087-pl526he1b5a44_0
  perl-io-zlib-1.10-pl526_2
  perl-json-4.02-pl526_0
  perl-json-xs-2.34-pl526h6bb024c_3
  perl-list-moreutils-0.428-pl526_1
  perl-list-moreutils-xs-0.428-pl526_0
  perl-pathtools-3.75-pl526h14c3975_1
  perl-scalar-list-utils-1.52-pl526h516909a_0
  perl-types-serialiser-1.0-pl526_2
  perl-xsloader-0.24-pl526_0

The following packages will be UPDATED:

  coreutils                      bioconda::coreutils-8.25-1 --&gt; pkgs/main::coreutils-8.32-h7b6447c_0
  jemalloc                       bioconda::jemalloc-4.5.0-0 --&gt; pkgs/main::jemalloc-5.2.1-h2531618_5
  libdeflate            bioconda::libdeflate-1.2-h516909a_1 --&gt; pkgs/main::libdeflate-1.8-h7f8727e_5

The following packages will be SUPERSEDED by a higher-priority channel:

  gawk                   conda-forge::gawk-5.1.0-h516909a_0 --&gt; pkgs/main::gawk-5.1.0-h7b6447c_0

The following packages will be DOWNGRADED:

  xmltodict                                     0.12.0-py_0 --&gt; 0.12.0-pyhd3eb1b0_0


Proceed ([y]/n)? y


Downloading and Extracting Packages
libdeflate-1.8       | 51 KB     | ########################################################################################################################################################## | 100% 
coreutils-8.32       | 2.6 MB    | ########################################################################################################################################################## | 100% 
gawk-5.1.0           | 1007 KB   | ########################################################################################################################################################## | 100% 
xmltodict-0.12.0     | 13 KB     | ########################################################################################################################################################## | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: done</code>]]></description>
	<dc:creator>Rahul Nayak</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/43819/command-to-run-perf</guid>
	<pubDate>Sat, 05 Mar 2022 14:21:54 -0600</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/43819/command-to-run-perf</link>
	<title><![CDATA[Command to run PERF !]]></title>
	<description><![CDATA[<code>#Commands to run PERF
PERF --format fasta -t 30 -i reference.fasta -o PERF_output.tsv --include-atomic -m 2 -M 7 -l 12</code>]]></description>
	<dc:creator>Rahul Nayak</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/43818/bash-command-to-count-reads-in-fastq-file</guid>
	<pubDate>Sat, 05 Mar 2022 14:07:27 -0600</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/43818/bash-command-to-count-reads-in-fastq-file</link>
	<title><![CDATA[Bash command to count reads in fastq file !]]></title>
	<description><![CDATA[<code>#ref fastq file
#ref1_1.fq)

echo $(( $(wc -l &lt;reads/ref1_1.fq) / 4 ))</code>]]></description>
	<dc:creator>Rahul Nayak</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/43814/plot-kmer-stats-in-bash</guid>
	<pubDate>Thu, 03 Mar 2022 04:30:18 -0600</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/43814/plot-kmer-stats-in-bash</link>
	<title><![CDATA[Plot kmer stats in bash !]]></title>
	<description><![CDATA[<code>#!/bin/bash
#Counting k-mers for different k 
echo &quot;k,unique,distinct,total&quot;
for k in {1..15}; do
	kat hist -o phiX_$k.hist -m $k phiX.fasta &gt;/dev/null 2&gt;&amp;1
	egrep -v &#039;^#&#039; phiX_$k.hist|awk &#039;{if ($1==1) u=$2; d+=$2; t+=$2*$1;}\
	END{print &quot;&#039;$k&#039;,&quot;u&quot;,&quot;d&quot;,&quot;t}&#039;
done</code>]]></description>
	<dc:creator>Rahul Nayak</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/43813/multiline-fasta-to-single-line-fasta</guid>
	<pubDate>Wed, 02 Mar 2022 01:53:05 -0600</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/43813/multiline-fasta-to-single-line-fasta</link>
	<title><![CDATA[Multiline fasta to single line fasta !]]></title>
	<description><![CDATA[<code>perl -pe &#039;$. &gt; 1 and /^&gt;/ ? print &quot;\n&quot; : chomp&#039; in.fasta &gt; out.fasta</code>]]></description>
	<dc:creator>Rahul Nayak</dc:creator>
</item>
<item>
	<guid isPermaLink="true">https://bioinformaticsonline.com/snippets/view/43794/bash-script-to-transfer-files-to-server</guid>
	<pubDate>Mon, 21 Feb 2022 23:21:36 -0600</pubDate>
	<link>https://bioinformaticsonline.com/snippets/view/43794/bash-script-to-transfer-files-to-server</link>
	<title><![CDATA[Bash script to transfer files to server !]]></title>
	<description><![CDATA[<code># rsync options source destination

rsync -azvh --progress PacBio_clean.fa xxx@xxx.xxx.res.in:/home/

# scp source_file_name username@destination_host:destination_folder

scp –rpv /datafile xxx@192.168.1.100:/home/me</code>]]></description>
	<dc:creator>Neel</dc:creator>
</item>

</channel>
</rss>