From 1015b463e22468698474744317e6e252bb58e2cc Mon Sep 17 00:00:00 2001 From: Ramya Raviram Date: Thu, 15 Aug 2019 23:36:57 -0700 Subject: [PATCH] Update reduced_genome.sh line 31 - comment: added unique --- reduced_genome.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reduced_genome.sh b/reduced_genome.sh index f5f0930..48a4a36 100644 --- a/reduced_genome.sh +++ b/reduced_genome.sh @@ -28,7 +28,7 @@ cat up.txt down.txt > ${genome}_${enzyme}_flanking_sites_${fl}_2.bed awk '{if($2 >= 0 && $3 >=0) print $0}' ${genome}_${enzyme}_flanking_sites_${fl}_2.bed | grep -v -E 'random|JH|GL' - | sort -k1,1 -k2,2n | uniq > ${genome}_${enzyme}_flanking_sites_${fl}_unique_2.bed #get the sequence of unique flanking coordinates fastaFromBed -fi ${genome}.fa -bed ${genome}_${enzyme}_flanking_sites_${fl}_unique_2.bed -fo ${genome}_${enzyme}_flanking_sequences_${fl}_unique_2.fa -#get only sequences from FASTA file +#get only unique sequences from FASTA file grep -v '^>' ${genome}_${enzyme}_flanking_sequences_${fl}_unique_2.fa | sort | uniq -i -u | grep -xF -f - -B 1 ${genome}_${enzyme}_flanking_sequences_${fl}_unique_2.fa | grep -v '^--' > ${genome}_${enzyme}_flanking_sequences_${fl}_unique.fa #remove unwanted intermediate files