Thanks but it still shows same output saying flagstat: command not found
Hello All Biostar community user,
I am trying to use flagstat command option in samtools.
Usually people get below output when they type samtools.pl in terminal
Program: samtools (Tools for alignments in the SAM format)
Version: 0.1.18 (r982:295)
Usage: samtools <command> [options]
Command: view SAM<->BAM conversion
##sort sort alignment file
## mpileup multi-way pileup
depth compute the depth
faidx index/extract FASTA
tview text alignment viewer
index index alignment
idxstats BAM index stats (r595 or later)
fixmate fix mate information
## flagstat simple stats
calmd recalculate MD/NM tags and '=' bases
merge merge sorted alignments
rmdup remove PCR duplicates
reheader replace BAM header
cat concatenate BAMs
targetcut cut fosmid regions (for fosmid pool only)
phase phase heterozygotes
`
But in my case when I type samtools.pl, I am getting below output:
Program: samtools.pl (helper script for SAMtools)
Version: 0.3.3
Contact: Heng Li <lh3@sanger.ac.uk>
Usage: samtools.pl <command> [<arguments>]
Command: ## varFilter filtering SNPs and short indels
## pileup2fq generate fastq from `pileup -c'
## showALEN print alignment length (ALEN) following CIGAR
`
There is no option for flagstat.
When I type samtools.pl flagstat, it shows flagstat: command not found.
Hope you guys can help me out.
Thanks in advance
Naresh
3 answers
If samtools is not in your path you will have to refer to the full location. Check location of samtools binary and you are not in a directory where a perl file someone has called samtools.pl is present.
samtools flagstat example shown below from http://elvis.ccc.cranfield.ac.uk/CUBELP2/faces/SNPcalling.xhtml SNP calling comparison tab of SNP tutorial.
/home/rob/Downloads/samtools-0.1.19/samtools flagstat A.bam
If this does not work, reinstall. Hope that helps
Thanks a lot. I was in different directory.
Not it is working fine
Log in to answer this question.
The top thing is what people get when they type 'samtools' into the terminal. The bottom thing is what people get when they type 'samtools.pl' into the terminal. They are not the same. 'samtools' is what you want 99% of the time.