-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4940295
commit 4c43408
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/usr/bin/perl-w | ||
# ******************** Software Information ******************* | ||
# Version: TSNAD v1.1 | ||
# File: expression_filter.pl | ||
# Perl Version: 5.18.2 | ||
# Finish time: Octobor, 2018. | ||
# Developer: Jingcheng Wu, Zhan Zhou, Wenyi Zhao | ||
# Copyright (C) 2018-2019 - College of Pharmaceutical Sciences, | ||
# Zhejiang University - All Rights Reserved | ||
# ************************************************************* | ||
use strict; | ||
|
||
my $in=$ARGV[0]; #input mutation file | ||
my $seq=$ARGV[1]; #gene expression file | ||
my $out=$ARGV[2]; # output mutation with expression | ||
|
||
open IN, "<$in" or die "cannot open $in:$!"; | ||
open SEQ, "<$seq" or die "cannot open $seq:$!"; | ||
open OUT, ">$out" or die "cannot open $out:$!"; | ||
|
||
my %exp; | ||
while (<SEQ>){ | ||
chomp; | ||
my @line=split/\t/,$_; | ||
$exp{$line[0]."\t".$line[1]}=$line[7]."\t".$line[8]; | ||
} | ||
|
||
while (<IN>){ | ||
chomp; | ||
my @line=split/\t/,$_; | ||
if ($_=~/##/){ | ||
print OUT"$_\n"; | ||
} | ||
elsif($_=~/#/){ | ||
print OUT "$_\tRPKM\tTPM\n"; | ||
} | ||
elsif($exp{$line[3]."\t".$line[17]}){ | ||
my $expression=$exp{$line[3]."\t".$line[17]}; | ||
my @expession=split/\t/,$expression; | ||
print OUT"$_\t$expression\n" if ($expression>1); | ||
} | ||
} |