samtools

Make can't find curses.h

倾然丶 夕夏残阳落幕 提交于 2021-01-24 09:13:37
问题 I have this program called samtools (version 1.3) that is used for manipulating the files that you get from DNA sequencing experiments. The downloaded program is contained in a folder. To set the program up I enter that folder in the terminal (on an ubuntu computer). I enter the commando "make". it runs an prints what it does but terminates with the error message: bam_tview_curses.o bam_tview_curses.c bam_tview_curses.c:41:20: fatal error: curses.h: No such file or directory #include <curses

C++使用htslib库读入和写出bam文件

笑着哭i 提交于 2020-02-12 10:38:56
  有时候我们需要使用C++处理bam文件,比如取出read1或者read2等符合特定条件的序列,根据cigar值对序列指定位置的碱基进行统计或者对序列进行处理并输出等,这时我们可以使用htslib库。htslib可以用来处理SAM, BAM,CRAM 和VCF文件,是samtools、bcftools的核心库。 #include <stdio.h> #include <stdlib.h> #include <htslib/sam.h> using namespace std; #define bam_is_read1(b) (((b)->core.flag&BAM_FREAD1) != 0) uint8_t Base[16] = {0,65,67,0,71,0,0,0,84,0,0,0,0,0,0,78}; int main(int argc, char **argv) { bam_hdr_t *header; bam1_t *aln = bam_init1(); samFile *in = sam_open(argv[1], "r"); htsFile *outR1 = hts_open(argv[2], "wb"); header = sam_hdr_read(in); if (sam_hdr_write(outR1, header) < 0) { fprintf

Makefile - samtools installation failed

假如想象 提交于 2019-12-24 00:42:42
问题 I'm trying to install samtools on openSUSE, I did this: cd htslib-1.2.1 ./configure make install Worked fine. bcftools-1.2 ./configure make install Worked fine. And for samtools: cd samtools-1.2 make install Produces this output: /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libcurses.so when searching for -lcurses /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lcurses collect2: error: ld

[SAMtools] 常用指令总结

↘锁芯ラ 提交于 2019-12-23 04:58:03
源自:http://sanwen.net/a/hirxmpo.html samtools是一系列处理bam和sam格式文件的应用程序集合,具有众多的功能。 首先呢,bam和sam文件主要是bwa、bowtie、tophat等序列比对工具产生的,这些软件我们后面会谈到。 软件下载安装: 地址:https://sourceforge.net/projects/samtools/ 解压下载后的压缩文件,然后你会看到README文件,里面有详细的安装操作说明。 安装成功后,运行samtools,你会看到: 目前最新版本是1.3.1 下面我们针对samtools的主要命令以及参数做个实例演示。 操作文件下载: wget http://popgen.dk/software/download/angsd/bams.tar.gz 解压后,在bams文件夹下,你会看到10个bam文件: 名字太复杂,进行批量重命名 rename "s/.mapped.ILLUMINA.bwa.CEU.low_coverage.20111****14.bam//" * 结果如下: 1、view 主要功能:sam和bam文件之间相互转换,针对bam文件进行相关操作。bam文件是sam文件的二进制格式,占据内存较小且运算速度快。 查看view的主要参数: 重要参数释义: -b:输出bam格式,用于后续分析 -C

Mpileup regex command to remove indels

半城伤御伤魂 提交于 2019-12-13 07:17:46
问题 I am trying to filter out insertions and deletions from an mpileup txt file. An example of an insertion or deletion would be +3ATG or -9AATCGTCTC. In another post I found a solution using perl: regular expression that reference a match from earlier part of expression However, the script writes insertions and deletions to the special variable $&. I would like to replace all insertions and deletions with nothing in a new variable. So my solution is identical, but with substitution at the start

Oscillating processing speed in a python script using pysam.TabixFile to annotate reads

寵の児 提交于 2019-12-12 11:35:09
问题 The initial question I'm writing a bioinformatics script in python (3.5) that parses a large (sorted and indexed) bam file representing sequencing reads aligned on a genome, associates genomic information ("annotations") to these reads, and counts the types of annotations encountered. I'm measuring the speed at which my script processes aligned reads (over batches of 1000 reads), and I obtain the following speed variations: What could explain this pattern? My intuition would make me bet on

find_circ的使用教程

ぐ巨炮叔叔 提交于 2019-12-06 08:47:51
1.find_circ的安装 #find_circ需要运行在装有python 2.7的64位系统上,同时需要安装numpy和pysam这两个python模块。其运行需要借助bowtie2和samtools来完成基因组mapping的过程。 wget https://github.com/marvin-jens/find_circ/archive/v1.2.tar.gz tar -xzvf v1.2.tar. gz 2.参考基因组的下载 #通过fetch_ucsc.py下载ucsc最新版本的参考基因组 fetch_ucsc.py hg19/hg38/mm9/mm10 ref/kg/ens/fa out 3.bowtie2建立参考基因组索引 bowtie2_build hg38.fa hg38 4.基于RNA-Seq的基因组比对(pair-end模式) ### bowtie2 参数介绍 ### -p 使用多线程;--very-sensitive 允许多重比对,报告出最好的一个;--score-min=C,-15,0 设置比对分数函数;--mm 设置I/O模式。 ### samtools view 参数介绍 ### -h 文件包含header line;-b 输出bam格式;-u 输出非压缩的bam格式 –S 忽略版本兼容 bowtie2 -p 16 --very-sensitive -

Installing Bio::DB::Sam perl module

匿名 (未验证) 提交于 2019-12-03 02:26:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to install a perl module Bio::DB::Sam on my home directory on a remote server. I downloaded the module, extracted the files, and ran: perl Build.pl prefix=~/local this is what happens next: This module requires samtools 0.1.10 or higher (samtools.sourceforge.net). Please enter the location of the bam.h and compiled libbam.a files: **/some_places/samtools-0.1.19** Found /some_places/samtools-0.1.19/bam.h and /some_places/samtools-0.1.19/libbam.a. Created MYMETA.yml and MYMETA.json Creating new 'Build' script for 'Bio-SamTools'

linux下无root源码安装软件

*爱你&永不变心* 提交于 2019-12-02 23:45:40
先进入源码文件夹下指定安装路径   ./configure --prefix=/public/home/ztu/usr/samtools 编译 make 安装 make install 写入环境变量 vim ~/.bashrc 键入: export PATH=$PATH:/public/home/ztu/usr/samtools/bin/ wq保存更改退出vim 再激活: source .bashrc 正常情况下,就可以成功安装了。其他软件同理。 来源: https://www.cnblogs.com/acm-icpcer/p/11767852.html

Samtools

两盒软妹~` 提交于 2019-12-01 01:59:47
samtools是一个用于操作sam和bam文件的工具合集。包含有许多命令。 faidx: 对fasta文件建立索引,生成的索引文件以.fai后缀结尾。 对基因组文件建立索引 $ samtools faidx genome.fasta 生成了索引文件genome.fasta.fai,是一个文本文件,分成了5列。第一列是子序列的名称; 第二列是子序列的长度; 最后的数字是genome.fasta文件的大小;第4和5列不知是啥意思。通过此文件,可以定位子序列在fasta文件在磁盘上的存放位置,直接快速调出子序列。 由于有索引文件,可以使用以下命令很快从基因组中提取到fasta格式的子序列 $ samtools faidx genome.fasta scffold_10 > scaffold_10.fasta 参考来源: http://www.chenlianfu.com/?p=1399 来源: https://www.cnblogs.com/bio-mary/p/11647144.html