Question: Why Import Command In Samtools Is Not Shown In The Short Help Of Samtools?
gravatar for Pablo Marin-Garcia
9.3 years ago by
Pablo Marin-Garcia1.8k wrote:

I am converting sam to bam using 'samtools import' command.

I am curious why if I do 'samtools' I can not see the 'import' command?

Program: samtools (Tools for alignments in the SAM format) Version: 0.1.13 (r926:134)

Usage: samtools <command/> [options]

Command: view        SAM<->BAM conversion
         sort        sort alignment file
         pileup      generate pileup output
         mpileup     multi-way pileup
         faidx       index/extract FASTA
         tview       text alignment viewer
         index       index alignment
         idxstats    BAM index stats (r595 or later)
         fixmate     fix mate information
         glfview     print GLFv3 file
         flagstat    simple stats
         calmd       recalculate MD/NM tags and '=' bases
         merge       merge sorted alignments
         rmdup       remove PCR duplicates
         reheader    replace BAM header
         targetcut   cut fosmid regions (for fosmid pool only)
         phase       phase heterozygotes

If I do samtools import it says:

 $  samtools import
Usage: bamtk import <in.ref_list> <in.sam> <out.bam>

I find out the samtools import time ago by chance in a blog (unable to find it in any samtools doc [is it there? where?]), until then I was doing it with a less concise command:

samtools view -bt ref.fa.fai aln.sam > aln.bam

Why is import command not documented in the samtools help? Why samtools import usage talk about bamtk?

samtools • 5.5k views
ADD COMMENTlink modified 5.4 years ago by Biostar ♦♦ 20 • written 9.3 years ago by Pablo Marin-Garcia1.8k
gravatar for Pablo Marin-Garcia
9.3 years ago by
Pablo Marin-Garcia1.8k wrote:

This is as far I went to answer myself:

I have seen at samtools code that all other samtools commands have a bam_[?]command[?].c execpt import and that there is a bamtk.c.

bamtk.c has the command help also with no imoport


But then in the argument parsing the first one is import





2009 man page


But in the latest man pages does not have the import command but, in view option -t still have the old wording referencing to the import command.


So seems that import command is not longer supported and functionality has been passed to view -bt

ADD COMMENTlink modified 9.2 years ago • written 9.3 years ago by Pablo Marin-Garcia1.8k

I believe import was deprecated over a year ago in favor of view.

ADD REPLYlink written 9.3 years ago by Aaronquinlan11k

@aaronQuinlan, I compiled samtools manually and didn't put the manpages. Looking to a man pae over internet: COMMANDS AND OPTIONS import samtools import [?] [?] [?]

             Since 0.1.4, this command is an alias of:

             samtools view -bt <in.ref_list> -o <out.bam> <in.sam> (2009)

ADD REPLYlink written 9.2 years ago by Pablo Marin-Garcia1.8k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2071 users visited in the last hour