How to count the number of reads in each chromosome in a bam file? The bam file is already sorted by the chromosome names. If the bam file is indexed, you may quickly get these info from the index: samtools idxstats in.bam | awk ‘{print $1″ “$3}’ If the bam file is not indexed, you
Read more
Tag: bioinformatics
How to merge sam files on Linux?
Posted onThe samtools merge can merge bam files while it can not work for sam files. How to merge sam files on Linux? According to the sam format specification, header lines start with @, while alignment lines do not. So you can use grep to merge sam files as follows efficiently. Assume the header is from
Read more
Hadoop Installation Tutorial (Hadoop 1.x)
Posted onUpdate: If you are new to Hadoop and trying to install one. Please check the newer version: Hadoop Installation Tutorial (Hadoop 2.x). Hadoop mainly consists of two parts: Hadoop MapReduce and HDFS. Hadoop MapReduce is a programming model and software framework for writing applications, which is an open-source variant of MapReduce that is initially designed
Read more