不积小流 , 无以成江海 !分享 http://blog.sciencenet.cn/u/xiongchaoliang

博文

测序分析中常用文本格式之间的转换

已有 8708 次阅读 2014-11-29 23:43 |个人分类:【技术-脚本】|系统分类:科研笔记

1.gtfBed的互相转换, 两者都是基因注释文件,gtf的一行表示一个exon,多行表示一个基因。而bed的一行表示一个基因。
$ perl gtf2Bed.pl $gtfFile >$bedFile
$ sh bedToGtf.sh $bedFile >$gtfFile

gtf2Bed.pl

bedToGtf.sh


2.利用bed从基因组上取fasta
$twoBitToFa -bed=$bedFile $genome.2bit $fastaFile
补充:fasta转成2bit

$ faToTwoBit in.fa out.2bit


3.bam转成bedgraph  

bedgrahp可以对bam文件进行可视化的查看,写论文时经常要截图
$ genomeCoverageBed -bg -ibam $bamFile -g $genome.sizes > $bedgraphFile

4.sam与bam的互转
bam-->sam:
$ samtools view -h -o $out.sam $in.bam
sam-->bam:
$ samtools view -bS in.sam >out.bam


5.Usage:   fq_all2std.pl command in.txt

Command: scarf2std      Convert SCARF format to the standard/Sanger FASTQ
        fqint2std      Convert FASTQ-int format to the standard/Sanger FASTQ
        sol2std        Convert Solexa/Illumina FASTQ to the standard FASTQ
        fa2std         Convert FASTA to the standard FASTQ
        fq2fa          Convert various FASTQ-like format to FASTA
        instruction    Explanation to different format
        example        Show examples of various formats

fq_all2std.rar




https://wap.sciencenet.cn/blog-1509670-847310.html

上一篇:转录组的怪事:嵌合RNA
下一篇:SAM格式详解
收藏 IP: 159.226.43.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-5-23 20:05

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部