Mercurial > repos > vipints > deseq_hts
comparison deseq-hts_2.0/src/remove_reads_from_other_genes.m @ 10:2fe512c7bfdf draft
DESeq2 version 1.0.19 added to the repo
author | vipints <vipin@cbio.mskcc.org> |
---|---|
date | Tue, 08 Oct 2013 08:15:34 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
9:e27b4f7811c2 | 10:2fe512c7bfdf |
---|---|
1 function [READS_OUT,FLAG]=remove_reads_from_other_genes(READS,GENE) | |
2 %This funtion removes the reads in READS which could ome from other | |
3 %annotated genes. FLAG is 1 if this was sucsesfull and 0 otherwise | |
4 READS_IN=READS; | |
5 if isfield(GENE,'non_unique_regions') | |
6 EXONS=GENE.non_unique_regions; | |
7 IDX=zeros(1,GENE.stop-GENE.start+1); | |
8 | |
9 for i=1:size(EXONS,1) | |
10 START=max(EXONS(i,1),GENE.start)-GENE.start+1; | |
11 STOP=min(EXONS(i,2),GENE.stop)-GENE.start+1; | |
12 IDX(START:STOP)=1; | |
13 end | |
14 READS=READS(not(sum(READS(:,IDX>0),2)==sum(READS,2)),:); | |
15 FLAG=1; | |
16 READS_OUT=READS; | |
17 else | |
18 READS_OUT=READS_IN; | |
19 FLAG=0; | |
20 end | |
21 |