circos输入数据文件格式化——depth,GC,geneskew

本文介绍了一个小脚本的使用,该脚本用于将正负链的深度数据文件转化为适合circos的格式,并能计算基因的GC含量和geneskew,同时为gtf基因区域提供高亮展示。
摘要由CSDN通过智能技术生成

写了一个小脚本用来格式化数据格式,必须有正负链的深度文件,得到gtf的基因高亮区域,并且计算gc含量和geneskew:

#!/usr/bin/env perl 
use warnings;
use strict;
use Getopt::Long;

my %opt;
GetOptions(\%opt, "len=s");
$opt{len} ||= 1000;

die qq/
Usage:	perl $0 <contig.length> <ref.gtf> <ref.genome.fa> <plus.depth> <minus.depth> -len 1000(default 1000)

/ if(@ARGV < 4);

my %hash;
my %dp;
my (%gcp, %gs);
my $ci = 1;
my $cl = shift @ARGV;
open CL, $cl or die $!;
open KT, ">karyotype.txt" or die $!;
while(<CL>)
{
	chomp;
	my @tmp = split;
	print KT "chr - hs$ci $tmp[0] 0 $tmp[1] color\n";
	$hash{$tmp[0]} = "hs$ci";
	push @{$dp{$tmp[0]}}, "0";
	push @{$gcp{$tmp[0]}}, "0";
	push @{$gs{$tmp[0]}}, "0";
	$ci ++;
}
close CL;

my $j = 1;
my $gtf = shift @ARGV;
open GTF, $gtf or die $!;
open PO, ">plu
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值