![]() |
文质彬彬的红金鱼 · 广场舞网盘资源 - 百度· 5 月前 · |
![]() |
眼睛小的青蛙 · 广安――西部电子信息产业投资首选地--邓小平 ...· 6 月前 · |
![]() |
逼格高的小虾米 · BKPP,终于在内娱火了?_明星_活动_bkpp· 6 月前 · |
![]() |
帅气的青蛙 · 微信视频号上热门功能服务条款· 8 月前 · |
samtools tview chr:pos ] STR ] display ] <in.sorted.bam> [ref.fasta] Text alignment viewer (based on the ncurses library). In the viewer, press `?' for help and press `g' to check the alignment start from a region in the format like `chr10:10,000,000' or `=10,000,000' when viewing the same reference sequence.
samtools quickcheck [ options ] in.sam | in.bam | in.cram [ ... ] Quickly check that input files appear to be intact. Checks that beginning of the file contains a valid header (all formats) containing at least one target sequence and then seeks to the end of the file and checks that an end-of-file (EOF) is present and intact (BAM only). Data in the middle of the file is not read since that would be much more time consuming, so please note that this command will not detect internal corruption, but is useful for testing that files are not truncated before performing more intensive tasks on them. This command will exit with a non-zero exit code if any input files don't have a valid header or are missing an EOF block. Otherwise it will exit successfully (with a zero exit code). samtools head [ options ] in.sam | in.bam | in.cram Prints the input file's headers and optionally also its first few alignment records. This command always displays the headers as they are in the file, never adding an extra @PG header itself.
samtools index [ -bc ] INT ] aln.sam.gz | aln.bam | aln.cram [ out.index ] Index a coordinate-sorted SAM, BAM or CRAM file for fast random access. Note for SAM this only works if the file has been BGZF compressed first. (Starting from Samtools 1.16, this command can also be given several alignment filenames, which are indexed individually.) This index is needed when region arguments are used to limit samtools view and similar commands to particular regions of interest. If an output filename is given, the index file will be written to out.index . Otherwise, for a CRAM file aln.cram , index file aln.cram .crai will be created; for a BAM or SAM file aln.bam , either aln.bam .bai aln.bam .csi will be created, depending on the index format selected. samtools sort level ] maxMem ] out.bam ] format ] [ -n ] tag ] tmpprefix ] threads ] [ in.sam | in.bam | in.cram ] Sort alignments by leftmost coordinates, or by read name when is used. An appropriate @HD-SO sort order header tag will be added or an existing one updated if necessary. The sorted output is written to standard output by default, or to the specified file ( out.bam ) is used. This command will also create temporary files tmpprefix . %d .bam as needed when the entire alignment data cannot fit into memory (as controlled via the option). Consider using samtools collate instead if you need name collated data without a full lexicographical sort. Note that if the sorted output file is to be indexed with samtools index , the default coordinate sort must be used. Thus the options are incompatible with samtools index .
samtools collate [ options ] in.sam | in.bam | in.cram [ <prefix> ] Shuffles and groups reads together by their names. A faster alternative to a full query name sort, collate ensures that reads of the same name are grouped together in contiguous groups, but doesn't make any guarantees about the order of read names between groups. The output from this command should be suitable for any operation that requires all reads from the same template to be grouped together.
samtools cram-size [ options ] in.cram Produces a summary of CRAM block Content ID numbers and their associated Data Series stored within them. Optionally a more detailed breakdown of how each data series is encoded per container may also be listed using the -e or --encodings option.
samtools idxstats in.sam | in.bam | in.cram Retrieve and print stats in the index file corresponding to the input file. Before calling idxstats, the input BAM file should be indexed by samtools index. If run on a SAM or CRAM file or an unindexed BAM file, this command will still produce the same summary statistics, but does so by reading through the entire file. This is far slower than using the BAM indices. The output is TAB-delimited with each line consisting of reference sequence name, sequence length, # mapped reads and # unmapped reads. It is written to stdout.
samtools flagstat in.sam | in.bam | in.cram Does a full pass through the input file to calculate and print statistics to stdout. Provides counts for each of 13 categories based primarily on bit flags in the FLAG field. Each category in the output is broken down into QC pass and QC fail, which is presented as "#PASS + #FAIL" followed by a description of the category.
samtools flags INT | STR [,...] Convert between textual and numeric flag representation. FLAGS: 0x1 PAIREDpaired-end (or multiple-segment) sequencing technology 0x2 PROPER_PAIReach segment properly aligned according to the aligner 0x4 UNMAPsegment unmapped 0x8 MUNMAPnext segment in the template unmapped 0x10 REVERSESEQ is reverse complemented 0x20 MREVERSESEQ of the next segment in the template is reverse complemented 0x40 READ1the first segment in the template 0x80 READ2the last segment in the template 0x100 SECONDARYsecondary alignment 0x200 QCFAILnot passing quality controls 0x400 DUPPCR or optical duplicate 0x800 SUPPLEMENTARYsupplementary alignment
samtools stats [ options ] in.sam | in.bam | in.cram [ region ...] samtools stats collects statistics from BAM files and outputs in a text format. The output can be visualized graphically using plot-bamstats.
samtools bedcov [ options ] region.bed in1.sam | in1.bam | in1.cram [...] Reports the total read base count (i.e. the sum of per base read depths) for each genomic region specified in the supplied BED file. The regions are output as they appear in the BED file and are 0-based. Counts for each alignment file supplied are reported in separate columns.
samtools depth [ options ] [ in1.sam | in1.bam | in1.cram [ in2.sam | in2.bam | in2.cram ] [...]] Computes the read depth at each position or region.
samtools ampliconstats [ options ] primers.bed in.sam | in.bam | in.cram [...] samtools ampliconstats collects statistics from one or more input alignment files and produces tables in text format. The output can be visualized graphically using plot-ampliconstats. The alignment files should have previously been clipped of primer sequence, for example by samtools ampliconclip and the sites of these primers should be specified as a bed file in the arguments.
samtools mpileup [ -EB ] capQcoef ] reg ] in.fa ] list ] minBaseQ ] minMapQ ] in.bam [ in2.bam [ ... ]] Generate textual pileup for one or multiple BAM files. For VCF and BCF output, please use the bcftools mpileup command instead. Alignment records are grouped by sample (SM) identifiers in @RG header lines. If sample identifiers are absent, each input file is regarded as one sample. See the samtools-mpileup man page for a description of the pileup format and options.
samtools consensus [ options ] in.bam Generate consensus from a SAM, BAM or CRAM file based on the contents of the alignment records. The consensus is written either as FASTA, FASTQ, or a pileup oriented format. The default output for FASTA and FASTQ formats include one base per non-gap consensus. Hence insertions with respect to the aligned reference will be included and deletions removed. This behaviour can be adjusted. Two consensus calling algorithms are offered. The default computes a heterozygous consensus in a Bayesian manner, derived from the "Gap5" consensus algorithm. A simpler base frequency counting method is also available.
samtools reference [ options ] in.bam Generate a reference from a SAM, BAM or CRAM file based on the contents of the SEQuence field and the MD:Z: auxiliary tags, or from the embedded reference blocks within a CRAM file (provided it was constructed using the embed_ref=1 option).
samtools coverage [ options ] [ in1.sam | in1.bam | in1.cram [ in2.sam | in2.bam | in2.cram ] [...]] Produces a histogram or table of coverage per chromosome.
samtools merge [ -nur1f ] inh.sam ] tag ] reg ] list ] out.bam in1.bam [ in2.bam in3.bam ... inN.bam ] Merge multiple sorted alignment files, producing a single sorted output file that contains all the input records and maintains the existing sort order. is specified the @SQ headers of input files will be merged into the specified header, otherwise they will be merged into a composite header created from the input headers. If the @SQ headers differ in order this may require the output file to be re-sorted after merge. The ordering of the records in the input files must match the usage of the -n and -t command-line options. If they do not, the output order will be undefined. See for information about record ordering.
samtools split [ options ] merged.sam | merged.bam | merged.cram Splits a file by read group, producing one or more output files matching a common prefix (by default based on the input filename) each containing one read-group. samtools cat list ] header.sam ] out.bam ] in1.bam in2.bam [ ... ] Concatenate BAMs or CRAMs. Although this works on either BAM or CRAM, all input files must be the same format as each other. The sequence dictionary of each input file must be identical, although this command does not check this. This command uses a similar trick to reheader which enables fast BAM concatenation.
samtools import [ options ] in.fastq [ ... ] Converts one or more FASTQ files to unaligned SAM, BAM or CRAM. These formats offer a richer capability of tracking sample meta-data via the SAM header and per-read meta-data via the auxiliary tags. The fastq command may be used to reverse this conversion.
samtools fastq [ options ] in.bam samtools fasta [ options ] in.bam Converts a BAM or CRAM into either FASTQ or FASTA format depending on the command invoked. The files will be automatically compressed if the file names have a .gz, .bgz, or .bgzf extension. The input to this program must be collated by name. samtools collate samtools sort -n to ensure this.
samtools faidx <ref.fasta> [region1 [...]] Index reference sequence in the FASTA format or extract subsequence from indexed reference sequence. If no region is specified, faidx will index the file and create <ref.fasta>.fai on the disk. If regions are specified, the subsequences will be retrieved and printed to stdout in the FASTA format. The input file can be compressed in the format. FASTQ files can be read and indexed by this command. Without using --fastq any extracted subsequence will be in FASTA format.
samtools fqidx <ref.fastq> [region1 [...]] Index reference sequence in the FASTQ format or extract subsequence from indexed reference sequence. If no region is specified, fqidx will index the file and create <ref.fastq>.fai on the disk. If regions are specified, the subsequences will be retrieved and printed to stdout in the FASTQ format. The input file can be compressed in the format. samtools fqidx should only be used on fastq files with a small number of entries. Trying to use it on a file containing millions of short sequencing reads will produce an index that is almost as big as the original file, and searches using the index will be very slow and use a lot of memory. samtools dict ref.fasta | ref.fasta.gz Create a sequence dictionary file from a fasta file.
samtools calmd [ -Eeubr ] capQcoef ] aln.bam ref.fasta Generate the MD tag. If the MD tag is already present, this command will give a warning if the MD tag generated is different from the existing tag. Output SAM by default. Calmd can also read and write CRAM files although in most cases it is pointless as CRAM recalculates MD and NM tags on the fly. The one exception to this case is where both input and output CRAM files have been / are being created with the no_ref option.
samtools fixmate [ -rpcm ] format ] in.nameSrt.bam out.bam Fill in mate coordinates, ISIZE and mate related flags from a name-sorted alignment.
samtools markdup length ] [ -r ] [ -s ] [ -T ] [ -S ] in.algsort.bam out.bam Mark duplicate alignments from a coordinate sorted file that has been run through samtools fixmate with the -m option. This program relies on the MC and ms tags that fixmate provides.
samtools rmdup [-sS] <input.srt.bam> <out.bam> This command is obsolete. Use markdup instead.
samtools addreplacerg rg-line rg-ID ] mode ] level ] out.bam ] in.bam Adds or replaces read group tags in a file.
samtools reheader [ -iP ] in.header.sam in.bam Replace the header in in.bam with the header in in.header.sam . This command is much faster than replacing the header with a BAM→SAM→BAM conversion. By default this command outputs the BAM or CRAM file to standard output (stdout), but for CRAM format files it has the option to perform an in-place edit, both reading and writing to the same file. No validity checking is performed on the header, nor that it is suitable to use with the sequence data itself.
samtools targetcut minBaseQ ] inPenalty ] em0 ] em1 ] em2 ] ref ] in.bam This command identifies target regions by examining the continuity of read depth, computes haploid consensus sequences of targets and outputs a SAM with each sequence corresponding to a target. When option is in use, BAQ will be applied. This command is designed for cutting fosmid clones from fosmid pool sequencing [Ref. Kitzman et al. (2010)].
samtools phase [ -AF ] len ] prefix ] minLOD ] minBaseQ ] in.bam Call and phase heterozygous SNPs.
samtools depad [ -SsCu1 ] ref.fa ] output ] in.bam Converts a BAM aligned against a padded reference to a BAM aligned against the depadded reference. The padded reference may contain verbatim "*" bases in it, but "*" bases are also counted in the reference numbering. This means that a sequence base-call aligned against a reference "*" is considered to be a cigar match ("M" or "X") operator (if the base-call is "A", "C", "G" or "T"). After depadding the reference "*" bases are deleted and such aligned sequence base-calls become insertions. Similarly transformations apply for deletions and padding cigar operations.
samtools ampliconclip out.file ] stat.file ] [ --soft-clip ] [ --hard-clip ] [ --both-ends ] [ --strand ] [ --clipped ] [ --fail ] [ --no-PG ] bed.file in.file Clip reads in a SAM compatible file based on data from a BED file.
samtools samples out.file ] [ -i ] TAG ] refs.fasta ] refs_list ] [ -X ] Prints the samples from alignment files
samtools reset FILE ] [ -x / --remove-tag tag_list ] [ --keep-tag tag_list ] [ --reject-PG pgid ] [ --no-RG ] [ --no-PG ] [...] Removes alignment information from records, producing an unaligned SAM, BAM or CRAM file. Flags are reset, header tags are updated or removed as appropriate, and auxiliary tags are removed or retained as specified. Note that the sort order is unchanged.
Display a brief usage message listing the samtools commands available. If the name of a command is also given, e.g., samtools help view , the detailed usage message for that particular command is displayed.
Display the version numbers and copyright information for samtools and the important libraries used by samtools.
Display the full samtools version number in a machine-readable format.
Output only. Specifies the compression level from 1 to 9, or 0 for uncompressed. If the output format is SAM, this also enables BGZF compression, otherwise SAM defaults to uncompressed.
Specifies the number of threads to use during encoding and/or decoding. For BAM this will be encoding only. In CRAM the threads are dynamically shared between encoder and decoder.
Apply filter STRING to all incoming records, rejecting any that do not satisfy the expression. See the FILTER EXPRESSIONS section below for specifics.
Specifies a FASTA reference file for use in CRAM encoding or decoding. It usually is not required for decoding except in the situation of the MD5 not being obtainable via the REF_PATH or REF_CACHE environment variables.
CRAM input only; defaults to 1 (on). CRAM does not typically store MD and NM tags, preferring to generate them on the fly. When this option is 0 missing MD, NM tags will not be generated. It can be particularly useful when combined with a file encoded using store_md=1 and store_nm=1.
CRAM output only; defaults to 0 (off). CRAM normally only stores MD tags when the reference is unknown and lets the decoder generate these values on-the-fly (see decode_md).
CRAM output only; defaults to 0 (off). CRAM normally only stores NM tags when the reference is unknown and lets the decoder generate these values on-the-fly (see decode_md).
CRAM input only; defaults to 0 (off). When enabled, md5 checksum errors on the reference sequence and block checksum errors within CRAM are ignored. Use of this option is strongly discouraged.
CRAM input only; specifies which SAM columns need to be populated. By default all fields are used. Limiting the decode to specific columns can have significant performance gains. The bit-field is a numerical value constructed from the following table. 0x1 SAM_QNAME 0x2 SAM_FLAG 0x4 SAM_RNAME 0x8 SAM_POS 0x10 SAM_MAPQ 0x20 SAM_CIGAR 0x40 SAM_RNEXT 0x80 SAM_PNEXT 0x100 SAM_TLEN 0x200 SAM_SEQ 0x400 SAM_QUAL 0x800 SAM_AUX 0x1000 SAM_RGAUX
CRAM input only; defaults to output filename. Any sequences with auto-generated read names will use string as the name prefix.
CRAM output only; defaults to 0 (off). By default CRAM generates one container per reference sequence, except in the case of many small references (such as a fragmented assembly).
CRAM output only. Specifies the CRAM version number. Acceptable values are "2.1", "3.0", and "3.1".
CRAM output only; defaults to 10000.
CRAM output only; defaults to 1. The effect of having multiple slices per container is to share the compression header block between multiple slices. This is unlikely to have any significant impact unless the number of sequences per slice is reduced. (Together these two options control the granularity of random access.)
CRAM output only; defaults to 0 (off). If 1, this will store portions of the reference sequence in each slice, permitting decode without having requiring an external copy of the reference sequence.
CRAM output only; defaults to 0 (off). If 1, sequences will be stored verbatim with no reference encoding. This can be useful if no reference is available for the file.
CRAM output only; defaults to 0 (off). Permits use of bzip2 in CRAM block compression.
CRAM output only; defaults to 0 (off). Permits use of lzma in CRAM block compression.
CRAM ≥ 3.1 output only; enables use of arithmetic entropy coding in CRAM block compression. This is off by default, but enabled for archive mode. This is significantly slower but sometimes smaller than the standard rANS entropy encoder.
CRAM ≥ 3.1 output only; enables and disables the fqzcomp quality compression method. This is on by default for version 3.1 and above only when the small and archive profiles are in use.
CRAM ≥ 3.1 output only; enables and disables the name tokeniser compression method. This is on by default for version 3.1 and above.
CRAM output only; defaults to 0 (off). If 1, templates with all members within the same CRAM slice will have their read names removed. New names will be automatically generated during decoding. Also see the name_prefix option.
CRAM output only. Set the CRAM compression profile. This is a simplified way of setting many output options at once. It changes the following options according to the profile in use. The "normal" profile is the default. Option fast normal small archive level 1567 use_bzip2 offoffonon use_lzma offoffoffon if level>7 use_tok(*) offononon use_fqz(*) offoffonon use_arith(*) offoffoffon seqs_per_slice 100001000025000100000 (*) use_tok , use_fqz and use_arith are only enabled for CRAM version 3.1 and above. The level listed is only the default value, and will not be set if it has been explicitly changed already. Additionally bases_per_slice is set to 500*seqs_per_slice unless previously explicitly set. For example: samtools view --input-fmt-option decode_md=0 --output-fmt cram,version=3.0 --output-fmt-option embed_ref --output-fmt-option seqs_per_slice=2000 -o foo.cram foo.bam samtools view -O cram,small -o bar.cram bar.bam The --write-index option enables automatic index creation while writing out BAM, CRAM or bgzf SAM files. Note to get compressed SAM as the output format you need to manually request a compression level, otherwise all SAM files are uncompressed. By default SAM and BAM will use CSI indices while CRAM will use CRAI indices. If you need to create BAI indices note that it is possible to specify the name of the index being written to, and hence the format, by using the filename##idx##indexname notation. For example: to convert a BAM to a compressed SAM with CSI indexing: samtools view -h -O sam,level=6 --write-index in.bam -o out.sam.gz To convert a SAM to a compressed BAM using BAI indexing: samtools view --write-index in.sam -o out.bam##idx##out.bam.bai The --verbosity INT option sets the verbosity level for samtools and HTSlib. The default is 3 (HTS_LOG_WARNING); 2 reduces warning messages and 0 or 1 also reduces some error messages, while values greater than 3 produce increasing numbers of additional warnings and logging messages.
A colon-separated list of directories in which to search for HTSlib plugins. If $HTS_PATH starts or ends with a colon or contains a double colon ( :: ), the built-in list of directories is searched at that point in the search. If no HTS_PATH variable is defined, the built-in list of directories specified when HTSlib was built is used, which typically includes /usr/local/libexec/htslib and similar directories.
A colon separated (semi-colon on Windows) list of locations in which to look for sequences identified by their MD5sums. This can be either a list of directories or URLs. Note that if a URL is included then the colon in http:// and ftp:// and the optional port number will be treated as part of the URL and not a PATH field separator. For URLs, the text %s will be replaced by the MD5sum being read. If no REF_PATH has been specified it will default to http://www.ebi.ac.uk/ena/cram/md5/%s and if REF_CACHE is also unset, it will be set to $XDG_CACHE_HOME/hts-ref/%2s/%2s/%s . If $XDG_CACHE_HOME is unset, $HOME/.cache (or a local system temporary directory if no home directory is found) will be used similarly.
This can be defined to a single location housing a local cache of references. Upon downloading a reference it will be stored in the location pointed to by REF_CACHE. REF_CACHE will be searched before attempting to load via the REF_PATH search list. If no REF_PATH is defined, both REF_PATH and REF_CACHE will be automatically set (see above), but if REF_PATH is defined and REF_CACHE not then no local cache is used. To avoid many files being stored in the same directory, REF_CACHE may be defined as a pattern using % num s to consume num characters of the MD5sum and %s to consume all remaining characters. If REF_CACHE lacks %s then it will get an implicit /%s appended. To aid population of the REF_CACHE directory a script misc/seq_cache_populate.pl is provided in the Samtools distribution. This takes a fasta file or a directory of fasta files and generates the MD5sum named files. For example if you use seq_cache_populate -subdirs 2 -root /local/ref_cache to create 2 nested subdirectories (the default), each consuming 2 characters of the MD5sum, then REF_CACHE must be set to /local/ref_cache/%2s/%2s/%s .
![]() |
文质彬彬的红金鱼 · 广场舞网盘资源 - 百度 5 月前 |
![]() |
逼格高的小虾米 · BKPP,终于在内娱火了?_明星_活动_bkpp 6 月前 |
![]() |
帅气的青蛙 · 微信视频号上热门功能服务条款 8 月前 |