Mercurial > repos > nml > assemblystats
annotate fasta_summary.pl @ 1:7556309ffbaf draft default tip
"planemo upload for repository https://github.com/phac-nml/galaxy_tools commit fb4c29f720748f46ff501140f2cd306bab6614f9"
author | nml |
---|---|
date | Fri, 29 May 2020 13:51:50 -0400 |
parents | ad2b274663f8 |
children |
rev | line source |
---|---|
0
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
1 #!/usr/bin/env perl |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
2 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
3 #============================================================================================== |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
4 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
5 # Script to output statistsics and histograms for reads and contigs/isotigs |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
6 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
7 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
8 # Outputs include: |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
9 # Mean, N50, StdDev or reads or contig lengths, |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
10 # Mean and Modal read or contig lengths. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
11 # Number of reads or contigs > 1 kb in length |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
12 # Summed contig length (by number of contigs, in sorted order) |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
13 # Histogram of read or contig lengths, |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
14 # Graph of sums of read-lengths |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
15 # File of reads or contigs sorted by read or contig length |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
16 # Test for mono/di-nucelotide repeats |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
17 # Randomly selected reads or contigs |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
18 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
19 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
20 # Needs gnuplot installed to create the histograms: |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
21 # On Fedora/Redhat linux: sudo yum install gnuplot |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
22 # On Ubuntu/Debian: sudo apt-get install gnuplot |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
23 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
24 # Uses a linux pipe to call gnu-plot directly, rather than as a separate shell script. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
25 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
26 # Original written by Sujai Kumar, 2008-09-05 University of Edinburgh |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
27 # Modified by Stephen: 29-Apr-2009: |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
28 # Last changed by Stephen: 9-Aug-2010 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
29 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
30 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
31 # Usage: fasta_summary.pl -i infile.fasta -o process_reads -t read OR contig OR isotig (to use 'read' or 'contig' or 'isotig' in the output table & graphs. Isotig is for 'runAssembly -cdna ...' output file '454Isotigs.fna') [-r 1 to indicate count simple nucleotide repeats] [-n number of random reads to output] [-c cutoff_length] [-l 1 to indicate output the longest read] [-f (s or t or w) for spacer, tab or wiki format table output.] |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
32 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
33 # Note: The parameters above in the [] are optional. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
34 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
35 # eg: fasta_summary.pl -i myfile.fasta -o process_reads -t read |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
36 # Where: |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
37 # -i reads or contigs as input, in fasta format. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
38 # -o output_dir (created if it doesn't exist) |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
39 # -t read, contig or isotig |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
40 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
41 # Gives back |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
42 # - N50 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
43 # - num of contigs > 1 kb |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
44 # - num of contigs |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
45 # - Read or Contig Histogram and graphs. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
46 # - Summed contig length (by number of contigs, in sorted order) |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
47 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
48 #============================================================================================== |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
49 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
50 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
51 use strict; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
52 use warnings; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
53 use Getopt::Long; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
54 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
55 my $infile; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
56 my $output_dir; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
57 my $type='read'; # Defaults to 'read' at present |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
58 my $repeats=1; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
59 my $num_random_reads_to_output=0; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
60 my $cutoff_length=-1; # -1 means won't check this cutoff |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
61 my $longest_read=-1; # -1 mean's don't output the sequence for the longest read. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
62 my $doCommify=1; # Outputs statistics numbers in format: 9,999,999 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
63 my $format="t"; # "s"=spaces between columns, "t"=tabs between columns, "w"=wiki '||' and '|'. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
64 my $bucket1=0; # For optional exact length histogram distribution as asked for by JH. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
65 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
66 if ($#ARGV==-1) {die " |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
67 Usage: |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
68 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
69 fasta_summary.pl -i infile.fasta -o output_dir -t ( read | contig | isotig ) [ -r 0 ] [ -n num_reads ] [ -c cutoff_length ] [ -l 1 ] [ -d 0 ] [ -f (w | t ) ] [ -bucket1 ] |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
70 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
71 where: |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
72 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
73 -i or -infile infile.fasta : input fatsa file of raeds, contigs or isotigs, |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
74 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
75 -o or -output_dir output_directory : directory to put output stats and graphs into. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
76 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
77 -t or -type (read or contig or isotig) : for displaying the graph title, where type is 'read' or 'contig' or 'isotig'. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
78 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
79 -r or -repeats 0 or 1 : 1=count number of reads that contain over 70% simple mono-nucleotide and di-nucleotide repeat bases; 0=don't count. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
80 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
81 -n or -number num_reads : For outputting specified number of randomly selected reads or contigs. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
82 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
83 -c or -cutoff cutoff_length : Give a number of reads to do extra analysis (calculating again the number of reads and number of bases in reads above this length) |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
84 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
85 -l or -longest 0 or 1 : 1=Output the longest read; 0= don't output the longest read |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
86 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
87 -d or -doCommify 0 or 1 : Output numbers formatted with commas to make easier to read: 0=no commas, default=1 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
88 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
89 -f or -format w or t : w=wiki_format (ie. table with || and | for column dividers), t=tabs between column symbols for the wiki pages, default is spaces between columns. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
90 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
91 -b or -bucket1 : To also output histogram file of exact read lengths (ie. bucket size of 1) |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
92 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
93 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
94 eg: For 454 reads: fasta_summary.pl -i RawReads.fna -o read_stats -t read |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
95 For 454 isotigs: fasta_summary.pl -i 454Isotigs.fna -o isotig_stats -t isotig |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
96 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
97 ";} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
98 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
99 GetOptions ( |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
100 "infile=s" => \$infile, |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
101 "output_dir=s" => \$output_dir, |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
102 "type=s" => \$type, ## type is 'read' or 'contig' or 'isotig' - for displaying the graph title |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
103 "repeats=i" => \$repeats, # To count simple repeats |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
104 "number=i" => \$num_random_reads_to_output, # For outputting specified number of random reads |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
105 "cutoff=i" => \$cutoff_length, # Give a number of reads to do extra analysis (calculating again the number of reads and number of bases in reads above this length) |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
106 "longest=i" => \$longest_read, # Output the longest read. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
107 "doCommify=i" => \$doCommify, # Output numbers formatted with commas to make easier to read: 0=no commas, default=1 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
108 "format=s" => \$format, # "w"=wiki_format (ie. table with || and | for column dividers), "t"=tabs between column symbols for the wiki pages, default is spaces between columns. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
109 "bucket1" => \$bucket1, # To also output histogram file of exact read lengths (ie. bucket size of 1) |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
110 ); |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
111 if ($#ARGV>-1) {die "Unused options specified: @ARGV\n";} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
112 if ( (! defined $infile) || ($infile eq '') ) {die "\nPlease give input fasta file, preceeded by the '-i' option\n\n";} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
113 if ( (! defined $output_dir) || ($output_dir eq '') ) {die "Please give output_directory, preceeded by the '-o' option\n\n";} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
114 if ( (! defined $type) || (($type ne 'contig') && ($type ne 'read') && ($type ne 'isotig')) ) {die "ERROR: On commandline: -t type must be 'contig' or 'read' or 'isotig'\n\n";} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
115 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
116 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
117 my ($L,$M,$R, $Lh,$Mh,$Rh, $Lhnewline,$Mhnotab); |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
118 if ($format eq 's') {($L,$M,$R, $Lh,$Mh,$Rh, $Lhnewline,$Mhnotab)=('',' ','', '',' ','', "\n",'');} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
119 elsif ($format eq 't') {($L,$M,$R, $Lh,$Mh,$Rh, $Lhnewline,$Mhnotab)=("\t","\t",'', "","\t",'', "\n",'');} # There is correctly a tab for the $L, but not the $Lh. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
120 elsif ($format eq 'w') {($L,$M,$R, $Lh,$Mh,$Rh, $Lhnewline,$Mhnotab)=('| ',' | ',' |', '|| ',' || ',' ||', '|| ',' || ');} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
121 else {die "\nInvalid output format code: '$format'. Should be 's', 't' or 'w'.\n\n";} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
122 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
123 ### create output_dir if it doesn't exist |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
124 if (-d $output_dir) { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
125 print STDERR " Directory '$output_dir' exists, so the existing fasta_summary.pl output files will be overwritten\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
126 } else { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
127 mkdir $output_dir; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
128 print STDERR " Directory '$output_dir' created\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
129 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
130 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
131 my $gc_count = 0; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
132 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
133 #--------------- Read in contigs from fasta file ------------------- |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
134 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
135 open INFILE, "<$infile" or die "Failed to open file: '$infile' : $!"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
136 open STATS, ">$output_dir/stats.txt" or die "Failed to open $output_dir/stats.txt: '' : $!"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
137 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
138 my $header = <INFILE>; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
139 if (! defined($header) ) {print "\n** ERROR: First line of input fasta file is undefined - so file must be empty **\n\n"; print STATS "No sequences found\n"; exit 1;} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
140 if ($header!~/^>/) {print "\nERROR: First line of input fasta file should start with '>' BUT first line is: '$header'\n"; print STATS "No sequences found\n"; exit 1;} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
141 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
142 my $seq = ""; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
143 my @sequences; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
144 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
145 while (<INFILE>) { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
146 if (/^>/) { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
147 push @sequences, [length($seq), $header, $seq]; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
148 $header = $_; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
149 $seq = ""; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
150 } else { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
151 chomp; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
152 $gc_count += tr/gcGC/gcGC/; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
153 $seq .= $_; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
154 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
155 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
156 push @sequences, [length($seq), $header, $seq]; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
157 close INFILE; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
158 if ($#sequences==-1) {print "\nERROR: There are zero sequences in the input file: $infile\n\n"; print STATS "No sequences found\n"; exit 1;} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
159 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
160 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
161 my $all_contigs_length=0; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
162 foreach (@sequences) {$all_contigs_length += $_->[0];} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
163 if ($all_contigs_length==0) {print "\nERROR: Length of all contigs is zero\n\n"; exit 2;} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
164 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
165 # Find number and number of bases in reads greater than the optional cut-off length given at command-line. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
166 my $num_reads_above_cutoff=0; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
167 my $num_of_bases_in_reads_above_cutoff=0; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
168 if ($cutoff_length>0) |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
169 { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
170 foreach (@sequences) |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
171 { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
172 if ($_->[0]>=$cutoff_length) {$num_of_bases_in_reads_above_cutoff+= $_->[0]; $num_reads_above_cutoff++;} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
173 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
174 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
175 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
176 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
177 #--------------- Gather Plots Data, Find N50, Print sorted contig file ------------------- |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
178 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
179 my $summed_contig_length = 0; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
180 my @summed_contig_data; # <-- For graph of summed length (in number of bases) versus number of contigs. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
181 my @summed_contig_data_contigLens; # <-- Added by SJBridgett to get graph of summed contig length versus min. contig length included (ie. X-axis is sort of inverse of above) |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
182 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
183 my $contig1k_count = 0; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
184 my $contig1k_length = 0; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
185 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
186 open SORTED, ">$output_dir/sorted_contigs.fa" or die $!; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
187 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
188 # top row in stats file |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
189 #print STATS "N50\nMax contig size\nNumber of bases in contigs\nNumber of contigs\nNumber of contigs >=1kb\nNumber of contigs in N50\nNumber of bases in contigs >=1kb\nGC Content of contigs\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
190 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
191 my $N50size=-1; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
192 my $N50_contigs = 0; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
193 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
194 my @sorted_by_contig_length = sort {$b->[0] <=> $a->[0]} @sequences; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
195 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
196 ### variables and initialization for histogram (stored in @bins) |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
197 my $max = $sorted_by_contig_length[0][0]; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
198 my $mean= $all_contigs_length/($#sequences+1); # <-- Added by Stephen Bridgett. Note: as $# gives the highest index number, so add 1 as arrays are zero-based. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
199 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
200 # Calculate standard deviation |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
201 my $sumsquares = 0; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
202 foreach (@sequences) {$sumsquares += ($_->[0] - $mean) ** 2;} # <-- Taken from John's "mean_fasta_length.pl" script. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
203 my $stddev = ( $sumsquares/($#sequences+1) ) ** 0.5; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
204 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
205 my $min = 0; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
206 # Aim for approximately 100 bins, so |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
207 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
208 my $bin_size=1; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
209 my $min_max_range=$max - $min; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
210 # $bin_size = ($min_max_range)/(99); # (99 is 100-1) so 1000/100 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
211 if ($min_max_range>=100000000) {$bin_size=1000000;} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
212 elsif ($min_max_range>=10000000) {$bin_size=100000;} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
213 elsif ($min_max_range>=1000000) {$bin_size=10000;} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
214 elsif ($min_max_range>=100000) {$bin_size=1000;} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
215 elsif ($min_max_range>=10000) {$bin_size=100;} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
216 else {$bin_size=10;} # elsif ($min_max_range>=1000) {$bin_size=10;} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
217 #elsif ($min_max_range>=100) {$bin_size=1;} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
218 #elsif ($min_max_range>=10) {} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
219 #elsif ($min_max_range>=1) {} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
220 # WAS: my $bin_size = ($type eq 'contig') ? 1000 : 10; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
221 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
222 my @bins; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
223 $#bins = int(($min_max_range)/$bin_size) + 1; # <-- Set the bins array size. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
224 foreach (@bins) {$_ = 0}; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
225 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
226 foreach (@sorted_by_contig_length) { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
227 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
228 my $curr_contig_length = $_->[0]; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
229 push @summed_contig_data_contigLens, $curr_contig_length; # <-- added by Stephen. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
230 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
231 $bins[int(($curr_contig_length + 1 - $min)/$bin_size)]++; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
232 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
233 $summed_contig_length += $curr_contig_length; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
234 push @summed_contig_data, $summed_contig_length; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
235 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
236 ### sorted contigs file |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
237 print SORTED $_->[1] . $_->[2] . "\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
238 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
239 if ($curr_contig_length >= 1000) { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
240 $contig1k_count++; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
241 $contig1k_length += $curr_contig_length; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
242 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
243 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
244 $N50_contigs++ unless ($N50size>-1); # Was unless $N50_found |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
245 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
246 if ($summed_contig_length > ($all_contigs_length / 2) and $N50size == -1) { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
247 $N50size = $curr_contig_length; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
248 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
249 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
250 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
251 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
252 if ($bucket1!=0) |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
253 { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
254 =pod |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
255 # This firsdt method works and agress with the second, but the lengths are in reverse order, at the @sorted_by_contig_length array was sorted with longest contig first. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
256 open BUCKET1, ">$output_dir/lengths_hist1.txt" or die "Failed to open file '$output_dir/lengths_hist1.txt' : $!\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
257 print BUCKET1 "Length\tFrequency\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
258 my $len=-1; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
259 my $count=0; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
260 foreach (@sorted_by_contig_length) |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
261 { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
262 if ( $len != $_->[0] ) {if ($len>-1) {print BUCKET1 "$len\t$count\n";} $len=$_->[0]; $count=0;} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
263 $count++; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
264 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
265 if ($len>-1) {print BUCKET1 "$len\t$count\n";} # Print length of final length grouping. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
266 close BUCKET1; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
267 =cut |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
268 open BUCKET1, ">$output_dir/lengths_hist1_with_zeros.txt" or die "Failed to open file '$output_dir/lengths_hist1_with_zeros.txt' : $!\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
269 print BUCKET1 "Length\tFrequency\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
270 my @bucket=(); # To check the result by using array. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
271 foreach (@sequences) |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
272 { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
273 my $len=$_->[0]; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
274 if (defined $bucket[$len]) {$bucket[$len]++;} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
275 else {$bucket[$len]=1;} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
276 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
277 for (my $i=0; $i<=$#bucket; $i++) |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
278 # for (my $i=$#bucket; $i>=0; $i--) # <-- for reverse order |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
279 { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
280 if (defined $bucket[$i]) {print BUCKET1 "$i\t$bucket[$i]\n";} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
281 else {print BUCKET1 "$i\t0\n";} # Can uncomment this later if don't want zeros in the output. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
282 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
283 close BUCKET1; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
284 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
285 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
286 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
287 my $type_plural=$type.'s'; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
288 print STATS $Lh."Statistics for $type lengths:".$Mhnotab.$Rh."\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
289 print STATS $L."Min $type length:".$M.&commify_if($sorted_by_contig_length[$#sequences][0],$doCommify).$R."\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
290 print STATS $L."Max $type length:".$M.&commify_if($max,$doCommify).$R."\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
291 printf STATS $L."Mean %s length:".$M."%.2f".$R."\n", $type,$mean; # <-- Added by Stephen Bridgett, April 2009. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
292 printf STATS $L."Standard deviation of %s length:".$M."%.2f".$R."\n", $type,$stddev; ## <-- Added by Stephen Bridgett, May 2009. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
293 print STATS $L."Median $type length:".$M.&commify_if($sorted_by_contig_length[int($#sequences/2)][0],$doCommify).$R."\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
294 print STATS $L."N50 $type length:".$M.&commify_if($N50size,$doCommify).$R."\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
295 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
296 print STATS $Lhnewline."Statistics for numbers of $type_plural:".$Mhnotab.$Rh."\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
297 print STATS $L."Number of $type_plural:".$M.&commify_if($#sequences+1,$doCommify).$R."\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
298 print STATS $L."Number of $type_plural >=1kb:".$M.&commify_if($contig1k_count,$doCommify).$R."\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
299 print STATS $L."Number of $type_plural in N50:".$M.&commify_if($N50_contigs,$doCommify).$R."\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
300 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
301 print STATS $Lhnewline."Statistics for bases in the $type_plural:".$Mhnotab.$Rh."\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
302 print STATS $L."Number of bases in all $type_plural:".$M.&commify_if($all_contigs_length,$doCommify).$R."\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
303 print STATS $L."Number of bases in $type_plural >=1kb:".$M.&commify_if($contig1k_length,$doCommify).$R."\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
304 printf STATS $L."GC Content of %s:".$M."%.2f %%".$R."\n", $type_plural,(100*$gc_count/$all_contigs_length); |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
305 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
306 if ($cutoff_length>0) |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
307 { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
308 print STATS $Lhnewline."Statistics for $type_plural >= $cutoff_length bp in length:".$Mhnotab.$Rh."\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
309 print STATS $L."Number of $type_plural >= $cutoff_length bp:".$M.&commify($num_reads_above_cutoff,$doCommify).$R."\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
310 print STATS $L."\tNumber of bases in $type_plural >= $cutoff_length bp:".$M.&commify($num_of_bases_in_reads_above_cutoff,$doCommify).$R."\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
311 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
312 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
313 if ($repeats==1) {&countRepeats();} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
314 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
315 print STATS "\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
316 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
317 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
318 # Output random selection of reads if requested on commandline: |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
319 my $fastaLineLen=60; # <-- The line length used for 454 sffinfo output, but could use a value read from input file (but be careful not to read a short line) |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
320 if ($num_random_reads_to_output>0) |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
321 { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
322 my @randlist; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
323 if ($num_random_reads_to_output<($#sequences+1)) |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
324 { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
325 print STATS "\nSome randomly selected reads:\n\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
326 @randlist= &getListOfRandomNumbers($#sequences, $num_random_reads_to_output); # Don't use ($#sequences + 1), just ($#sequences) otherwise would be outside the array. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
327 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
328 else # Just print all the sequences: |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
329 { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
330 print STATS "\nAll ".($#sequences+1)." reads:\n\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
331 for (my $i=0;$i<=$#sequences;$i++) {push @randlist,$i;} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
332 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
333 &print_sequences(\@randlist) |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
334 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
335 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
336 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
337 # Print the longest read: |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
338 if ($longest_read>0) |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
339 { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
340 my $length_of_longest_read=-1; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
341 my @longest_read=(); |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
342 my $i=0; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
343 foreach (@sequences) |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
344 { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
345 if ($_->[0]>$length_of_longest_read) {$length_of_longest_read=$_->[0]; $longest_read[0]=$i;} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
346 $i++; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
347 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
348 if ($length_of_longest_read>0) {print STATS "\nLongest read:\n"} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
349 &print_sequences(\@longest_read); |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
350 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
351 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
352 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
353 =pod |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
354 print STATS "\n$type\tSummed\nlength\tlength\n"; # <-- Added by Stephen Bridgett, but better to produce a graph instead. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
355 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
356 my $i=0; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
357 foreach (@summed_contig_data) { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
358 # print STATS $sorted_by_contig_length[$i]->[0]."\t".$summed_contig_data_contigLens[$i]."\t".$_."\t".$summed_contig_data[$i]."\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
359 print STATS $sorted_by_contig_length[$i]->[0]."\t".$_."\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
360 $i++; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
361 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
362 =cut |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
363 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
364 open SUMMED, ">$output_dir/summed_contig_lengths.dat" or die $!; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
365 print SUMMED join "\n",@summed_contig_data; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
366 close SUMMED; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
367 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
368 open HISTOGRAMBINS, ">$output_dir/histogram_bins.dat" or die $!; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
369 my $bin_size_counter = 0; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
370 foreach (@bins) { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
371 print HISTOGRAMBINS eval($bin_size_counter++ * $bin_size + $bin_size/2) . "\t$_\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
372 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
373 close HISTOGRAMBINS; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
374 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
375 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
376 # Graph of cumulative (summed) number of reads on y-axis, versus length of read (decending order) on x-axis |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
377 open SUMREAD_READLEN, ">$output_dir/sum_reads_vs_read_len.dat" or die $!; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
378 #my $read_counter= 0; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
379 my $read_counter= $#sorted_by_contig_length+1; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
380 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
381 foreach (@sorted_by_contig_length) { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
382 # $read_counter++; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
383 $read_counter--; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
384 print SUMREAD_READLEN "$_->[0]\n"; # $read_counter |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
385 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
386 close SUMREAD_READLEN; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
387 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
388 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
389 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
390 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
391 my $properType=ucfirst($type); # Makes the first letter an upper case letter, ie. 'Config' or 'Read' |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
392 #if ($type eq 'contig') |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
393 # { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
394 # print the outcome of the gnu_plot as may have a write permissions error sometimes. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
395 my $YHistogramScaleType = ($type eq 'read') ? '' : 'log y'; # Not using log scale for reads, just for contig/isotigs. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
396 &plot_graph('histogram', "$output_dir/histogram_bins.dat", "Histogram of $type lengths", "$properType length", "Number of $type_plural", '0.9', $YHistogramScaleType); |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
397 &plot_graph('line', "$output_dir/summed_contig_lengths.dat", "Summed $type lengths", "Number of $type_plural", "Summed $type length in bases", '0.9', ''); |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
398 &plot_graph('line', "$output_dir/sum_reads_vs_read_len.dat", "X-axis gives the Number of $type_plural that are greater than the $properType-length given on the Y-axis", "$properType length", "Cummulative number of $type_plural", '0.9', ''); |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
399 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
400 =pod |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
401 # print `gnuplot_histogram.sh $output_dir/histogram_bins.dat`; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
402 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
403 &plot_graph("$output_dir/summed_contig_lengths.dat", 'Summed contig lengths', 'Number of contigs', 'Summed contig length in bases', '0.9', ''); |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
404 # print `gnuplot_summedcontigs.sh $output_dir/summed_contig_lengths.dat`; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
405 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
406 &plot_graph('line', "$output_dir/sum_reads_vs_read_len.dat", 'X-axis gives the Number of contigs that are greater than the Contig-length given on the Y-axis', 'Contig length', 'Cummulative number of contigs', '0.9', ''); |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
407 # print `gnuplot_sum_contig_vs_contig_len.sh $output_dir/sum_reads_vs_read_len.dat`; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
408 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
409 elsif ($type eq 'read') |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
410 { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
411 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
412 # print `gnuplot_readshistogram_logY.sh $output_dir/histogram_bins.dat`; # There's also optionally a "...._linearY.sh" |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
413 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
414 &plot_graph('line', "$output_dir/summed_contig_lengths.dat",'Summed read lengths', 'Number of reads', 'Summed read length in bases', '0.9', ''); |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
415 # print `gnuplot_summedreads.sh $output_dir/summed_contig_lengths.dat`; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
416 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
417 &plot_graph('line', "$output_dir/sum_reads_vs_read_len.dat", 'X-axis gives the Number of reads that are greater than the Read-length given on the Y-axis', 'Read length', 'Cummulative number of reads', '0.9', ''); |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
418 # print `gnuplot_sum_reads_vs_read_len.sh $output_dir/sum_reads_vs_read_len.dat`; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
419 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
420 else {die "\n** ERROR: Invalid type='$type' **\n\n";} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
421 =cut |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
422 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
423 close SORTED; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
424 close STATS; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
425 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
426 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
427 # Use pipe to plot directly with gnuplot, rather than calling a separate shell script: |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
428 # http://www.vioan.ro/wp/2008/09/30/calling-gnuplot-from-perl/ |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
429 # http://forums.devshed.com/perl-programming-6/plotting-with-gnuplot-within-perl-script-549682.html |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
430 # Another option is the perl module: GnuplotIF: http://lug.fh-swf.de/perl/GnuplotIF.html OR: http://lug.fh-swf.de/perl/ |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
431 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
432 # PlPlot: Perl: http://search.cpan.org/~dhunt/PDL-Graphics-PLplot-0.47/plplot.pd |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
433 # http://plplot.sourceforge.net/ |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
434 # dislin: http://www.mps.mpg.de/dislin/overview.html |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
435 # MathGL: http://mathgl.sourceforge.net/index.html |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
436 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
437 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
438 sub plot_graph |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
439 { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
440 # Plots a histogram or xy-line graph |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
441 # Parameters: GraphType (histogram/line) DataFile, Title, X-label, Y-label, Y-range |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
442 # Graphfile should end with '.png' |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
443 # The $yloglinear is 'log y' for log, or '' for linear |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
444 my ($graphtype, $datafile, $title,$xlabel,$ylabel,$yrange,$yloglinear)=@_; # yrange for reads: 0.1, and for contigs: 0.9 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
445 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
446 my $graphstyle=''; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
447 if ($graphtype eq 'histogram') {$graphstyle="plot \"$datafile\" using 1:2 with boxes";} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
448 elsif ($graphtype eq 'line') {$graphstyle="plot \"$datafile\" using 1 with lines";} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
449 else {die "\n** ERROR: Invalid graphtype='$graphtype'\n\n";} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
450 my $yloglinearscale= ($yloglinear eq '') ? '' : "set $yloglinear"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
451 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
452 # To capture any errors that are normally sent from gnuplot to stderr, could use: open3 pipe interface: |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
453 # http://www.clintoneast.com/articles/perl-open3-example.php |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
454 # http://hell.org.ua/Docs/oreilly/perl2/prog/ch16_03.htm |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
455 # But the following should be fine, as the stderr will display when running the script anyway. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
456 # If needed a simpler way would be to sent the output to a file using eg: open (GNUPLOT, "|gnuplot > gnu_out.txt 2>&1") or die .... The read the resulting file. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
457 open (GNUPLOT, "|gnuplot") or die "\n**ERROR: Failed to open gnuplot : $!\n\n **"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
458 print GNUPLOT <<ENDPLOT; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
459 set terminal png |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
460 set output "$datafile.png" |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
461 set nokey |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
462 $yloglinearscale |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
463 set xlabel "$xlabel" |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
464 set ylabel "$ylabel" |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
465 set yrange [$yrange:] |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
466 set title "$title" |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
467 $graphstyle |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
468 ENDPLOT |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
469 close(GNUPLOT); |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
470 if ($? != 0) {print "\n** WARNING: GNUplot pipe returned non-zero status: '$?'\n\n";} # $? is the status returned by the last pipe close (or backtick or system operator) |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
471 if (! -e "$datafile.png") {die "\n** ERROR: Failed to create '$datafile.png'**\n\n";} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
472 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
473 =pod |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
474 #PNG |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
475 set term png small xFFFFFF |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
476 set output "$file.png" |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
477 set size 1 ,1 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
478 set nokey |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
479 set data style line |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
480 set xlabel "frequency" font "VeraMono,10" |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
481 set title "Fast Fourier Transform" font "VeraMono,10" |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
482 set grid xtics ytics |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
483 set xtics 100 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
484 plot "$file" using 1:2 w lines 1 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
485 =cut |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
486 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
487 #WAS PREVIOUSLY AS .sh script |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
488 =pod |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
489 # The 'gnuplot_readshistogram_logY.sh' is: |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
490 set terminal png |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
491 set output "$1.png" |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
492 set log y |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
493 set xlabel "Read length" |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
494 set ylabel "Frequency" |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
495 set yrange [0.9:] |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
496 set title "Histogram of read lengths" |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
497 plot "$1" using 1:2 with boxes |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
498 =cut |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
499 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
500 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
501 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
502 # Was previously a separate .sh file: |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
503 =pod |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
504 #!/bin/sh |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
505 gnuplot << EOF |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
506 set terminal png |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
507 set output "$1.png" |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
508 set xlabel "Number of contigs" |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
509 set ylabel "Summed contig length in bases" |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
510 set yrange [0.9:] |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
511 set title "Summed contig lengths" |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
512 plot "$1" using 1 with lines |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
513 EOF |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
514 =cut |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
515 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
516 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
517 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
518 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
519 # Added function to count number of simple dinucleotide repeats: |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
520 sub countRepeats |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
521 { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
522 # To count the number of sequences that contain mostly repeats. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
523 # This would be faster if called a C program on the file. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
524 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
525 # Common simple repeats are listed here: http://www.bioinfo.de/isb/2005/05/0041/ |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
526 # Dinucleotide |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
527 # AT/TA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
528 # AC/TG |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
529 # AG/TC |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
530 # CG/GC |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
531 # Trinucleotide |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
532 # AAT/TTA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
533 # CTA/GAT |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
534 # ATG/TAC |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
535 # ACT/TGA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
536 # CTC/GAG |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
537 # AGG/TCC |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
538 # CAG/GTC |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
539 # AAG/TTC |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
540 # ATA/TAT |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
541 # CAA/GTT |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
542 # AGC/TCG |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
543 # ACA/TGT |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
544 # ACG/TGC |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
545 # AGA/TCT |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
546 # ACC/TGG |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
547 # Other |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
548 # Tetranucleotide |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
549 # AAAT |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
550 # AAAC |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
551 # CACG |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
552 # AACA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
553 # AATA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
554 # AAGA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
555 # TGAA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
556 # AAAG |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
557 # ACAT |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
558 # AATG |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
559 # AGCC |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
560 # Other |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
561 # Pentanucleotide |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
562 # AAAAC |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
563 # AATTG |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
564 # GCTAA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
565 # ATAAT |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
566 # AAAAT |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
567 # AAACA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
568 # ATATA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
569 # TTGCC |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
570 # Other |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
571 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
572 # I also add mono-nucleotide repeats: - ie. just all T's, or A's, etc |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
573 # Just consider the dinucleotide repeats for now: |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
574 my ($ATseq,$CGseq,$ACseq,$TGseq,$AGseq,$TCseq)=(0,0,0,0,0,0); |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
575 my ($AAseq,$TTseq,$CCseq,$GGseq)=(0,0,0,0); |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
576 foreach (@sequences) |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
577 { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
578 my $seq_len=$_->[0]; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
579 my $seq=$_->[2]; # This copy might be slow, maybe should just stick with using the reference. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
580 my $mnt=0.35*$seq_len; # Mononucleotide threshold: HERE 0.35 also means 70%; 0.4 means 80% dinucleotide repeats, as really one base so 0.5 = 100% |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
581 my $dnt=0.35*$seq_len; # Dinucleotide threshold: 0.35 means 70%; 0.4 means 80% dinucleotide repeats, as two bases so 0.5 = 100% |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
582 my ($AT,$CG,$AC,$TG,$AG,$TC)=(0,0,0,0,0,0); |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
583 my ($AA,$TT,$CC,$GG)=(0,0,0,0); |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
584 # See: http://www.allinterview.com/showanswers/76719.html |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
585 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
586 # AT/TA seems most common repeat so process it first to save time: |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
587 while ($seq=~/AT/g) {$AT++;} if ($AT>$dnt) {$ATseq++; next;} # AT is same as TA. If has 80% AT's then won't have 80% AC etc. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
588 while ($seq=~/CG/g) {$CG++;} if ($CG>$dnt) {$CGseq++; next;} # CG is same as GC. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
589 # AC,TG |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
590 while ($seq=~/AC/g) {$AC++;} if ($AC>$dnt) {$ACseq++; next;} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
591 while ($seq=~/TG/g) {$TG++;} if ($TG>$dnt) {$TGseq++; next;} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
592 # AG/TC |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
593 while ($seq=~/AG/g) {$AG++;} if ($AG>$dnt) {$AGseq++; next;} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
594 while ($seq=~/TC/g) {$TC++;} if ($TC>$dnt) {$TCseq++; next;} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
595 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
596 # Added my simple mononucleotde repeat count: |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
597 while ($seq=~/AA/g) {$AA++;} if ($AA>$mnt) {$AAseq++; next;} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
598 while ($seq=~/TT/g) {$TT++;} if ($TT>$mnt) {$TTseq++; next;} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
599 while ($seq=~/CC/g) {$CC++;} if ($CC>$mnt) {$CCseq++; next;} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
600 while ($seq=~/GG/g) {$GG++;} if ($GG>$mnt) {$GGseq++; next;} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
601 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
602 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
603 my $num_seq=($#sequences+1); |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
604 my $total_din_repeats_seq= $ACseq+$TGseq+$ATseq+$AGseq+$TCseq+$CGseq; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
605 my $percent_din_repeats=100*$total_din_repeats_seq/$num_seq; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
606 print STATS "\nSimple Dinucleotide repeats:\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
607 printf STATS "\tNumber of %s with over 70%% dinucleotode repeats:\t%.2f %% (%d %s)\n", $type_plural, $percent_din_repeats, $total_din_repeats_seq, $type_plural; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
608 printf STATS "\tAT:\t%.2f %% (%d %s)\n", (100*$ATseq/$num_seq),$ATseq,$type_plural; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
609 printf STATS "\tCG:\t%.2f %% (%d %s)\n", (100*$CGseq/$num_seq),$CGseq,$type_plural; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
610 printf STATS "\tAC:\t%.2f %% (%d %s)\n", (100*$ACseq/$num_seq),$ACseq,$type_plural; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
611 printf STATS "\tTG:\t%.2f %% (%d %s)\n", (100*$TGseq/$num_seq),$TGseq,$type_plural; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
612 printf STATS "\tAG:\t%.2f %% (%d %s)\n", (100*$AGseq/$num_seq),$AGseq,$type_plural; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
613 printf STATS "\tTC:\t%.2f %% (%d %s)\n", (100*$TCseq/$num_seq),$TCseq,$type_plural; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
614 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
615 my $total_mono_repeats_seq= $AAseq+$TTseq+$CCseq+$GGseq; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
616 my $percent_mono_repeats=100*$total_mono_repeats_seq/$num_seq; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
617 print STATS "\nSimple mononucleotide repeats:\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
618 printf STATS "\tNumber of %s with over 50%% mononucleotode repeats:\t%.2f %% (%d %s)\n", $type_plural, $percent_mono_repeats, $total_mono_repeats_seq, $type_plural; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
619 printf STATS "\tAA:\t%.2f %% (%d %s)\n", (100*$AAseq/$num_seq),$AAseq,$type_plural; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
620 printf STATS "\tTT:\t%.2f %% (%d %s)\n", (100*$TTseq/$num_seq),$TTseq,$type_plural; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
621 printf STATS "\tCC:\t%.2f %% (%d %s)\n", (100*$CCseq/$num_seq),$CCseq,$type_plural; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
622 printf STATS "\tGG:\t%.2f %% (%d %s)\n", (100*$GGseq/$num_seq),$GGseq,$type_plural; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
623 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
624 return $percent_din_repeats+$percent_mono_repeats; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
625 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
626 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
627 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
628 sub commify_if |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
629 { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
630 # If doCommify is >0 then converts output to commas. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
631 # Formats '1234567890.01' with commas as "1,234,567,890.01 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
632 # Based on: http://www.perlmonks.org/?node_id=110137 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
633 my ($number,$doCommify)=@_; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
634 if ($doCommify > 0) {$number =~ s/(\d)(?=(\d{3})+(\D|$))/$1\,/g;} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
635 return $number; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
636 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
637 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
638 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
639 #--------------- Produce ordered list of random numbers ------------------- |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
640 # This is copied from: my_random_contigs.pl |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
641 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
642 sub getListOfRandomNumbers |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
643 { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
644 # Use: @list=getListOfRandomNumbers(200,20); to return sorted list of 20 numbers in range from 0 to 200 inclusive. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
645 my %list2=(); |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
646 my $i=0; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
647 my $MaxNumber=$_[0]; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
648 my $NumToPick=$_[1]; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
649 while ($i<$NumToPick) |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
650 { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
651 my $intRand = int(rand($MaxNumber+1)); # For Zero-based perl-arrays. The +1 means this generates random integers between 0 and $MaxNumber. (See: http://perldoc.perl.org/functions/rand.html ) |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
652 if ($intRand>$MaxNumber) {$intRand=$MaxNumber} # Just to be extra sure that don't exceed $MaxNumber. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
653 if ( !exists($list2{$intRand}) ) {$list2{$intRand}=1; $i++;} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
654 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
655 #foreach my $key(keys %list2) {print "$key ";} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
656 # Sort the list of numbers: |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
657 #my @SortedList2 = sort { $a <=> $b } keys(%list2); |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
658 #return @SortedList2; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
659 return (sort { $a <=> $b } keys(%list2)); |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
660 #print "Sorted list of ".$NumToPick." random numbers:\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
661 #foreach my $num(@SortedList2) {print "$num\n";} |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
662 #print "\n\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
663 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
664 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
665 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
666 sub print_sequences |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
667 { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
668 # Print the sequences wrapping sequences using index array, at line length of '$fastaLineLen' characters: |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
669 # Uses the global '@sequences' array. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
670 my $sequence_indexes_list=$_[0]; # This is an array reference, not the array itself. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
671 foreach my $num(@{$sequence_indexes_list}) |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
672 { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
673 #print "$num (max=$#sequences)\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
674 print STATS $sequences[$num]->[1]; # Prints the header, no "\n" needed after it. |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
675 my $pos=0; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
676 my $seqlen=$sequences[$num]->[0]; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
677 while ($pos<$seqlen) |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
678 { |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
679 print STATS substr($sequences[$num]->[2],$pos,$fastaLineLen)."\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
680 $pos+=$fastaLineLen; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
681 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
682 print STATS "\n"; |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
683 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
684 } |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
685 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
686 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
687 =pod |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
688 # Some test runs for mono-nucleotides and dinucelotides: |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
689 >FUOMOGO01AQV42DUMMYA length=339 xy=0189_0676 region=1 run=R_2009_04_23_17_54_06_ |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
690 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
691 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
692 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
693 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
694 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
695 >FUOMOGO01AQV42DUMMYB length=339 xy=0189_0676 region=1 run=R_2009_04_23_17_54_06_ |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
696 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
697 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
698 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
699 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
700 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
701 >FUOMOGO01AQV42DUMMYC length=339 xy=0189_0676 region=1 run=R_2009_04_23_17_54_06_ |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
702 TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
703 TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
704 TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
705 TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
706 >FUOMOGO01AQV42DUMMYD length=339 xy=0189_0676 region=1 run=R_2009_04_23_17_54_06_ |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
707 GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
708 GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
709 |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
710 >FUOMOGO01AQV42 length=339 xy=0189_0676 region=1 run=R_2009_04_23_17_54_06_ |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
711 TGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTG |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
712 TGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTG |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
713 TGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTG |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
714 TGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTG |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
715 TGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTG |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
716 TGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGT |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
717 >FUOMOGO01AUK0D length=214 xy=0231_0843 region=1 run=R_2009_04_23_17_54_06_ |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
718 ACACACACACACACACACACACACACACACACACACACACACACACACACACACACACAC |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
719 ACACACACACACACACACACACACACACACACACACACACACACACACACACACACACAC |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
720 ACACACACACACACACACACACACACACACACACACACACACACACACACACACACACAC |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
721 ACACACACACACACACACACACGACGACGACGAC |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
722 >FUOMOGO01AUB7C length=64 xy=0228_1718 region=1 run=R_2009_04_23_17_54_06_ |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
723 ATATATATATATATATATATATATATATATATATATATATATATATATATAGTACGTACG |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
724 TACG |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
725 >FUOMOGO01AU00B length=213 xy=0236_1097 region=1 run=R_2009_04_23_17_54_06_ |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
726 ACACACACACACACACACACACACACACACACACACACACACACACACACACACACACAC |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
727 ACACACACACACACACACACACACACACACACACACACACACACACACACACACACACAC |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
728 ACACACACACACACACACACACACACACACACACACACACACACACACACACACACACAC |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
729 ACACACACACACACACACACGACGACGACGACG |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
730 >FUOMOGO01ATYRT length=169 xy=0224_0695 region=1 run=R_2009_04_23_17_54_06_ |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
731 TGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTG |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
732 TGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTG |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
733 TGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGT |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
734 >FUOMOGO01ARMLN length=400 xy=0197_2201 region=1 run=R_2009_04_23_17_54_06_ |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
735 TATATATATATATATATATATATATATATATATATATATATATATATATATATATATATA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
736 TATAGTAGTAGTAGTATATATATATATATATATATATATATATATATATATATATATATA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
737 TATATATATATATATATATATATATATATATATATATATATATATATATATATATATATA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
738 TATATATATATATATATATATATATATATATATATATATATATATATATATATATATATA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
739 TATATATATATATATATATATATATATATATATATATATATATATATATATATATATATA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
740 TATATATATATATATATATATATATATATATATATATATATATATATATATATATATATA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
741 TATATATATATATATATATATATATATATATATATATATA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
742 >FUOMOGO01AVGRX length=44 xy=0241_1051 region=1 run=R_2009_04_23_17_54_06_ |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
743 TATATATATATATATATATATATATATATATATATATATATATA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
744 >FUOMOGO01ASZ6K length=315 xy=0213_0922 region=1 run=R_2009_04_23_17_54_06_ |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
745 TGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTG |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
746 TGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTG |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
747 TGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTG |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
748 TGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTG |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
749 TGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTGTG |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
750 TGTGTGTGTGTGTGT |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
751 >FUOMOGO01ARSZF length=65 xy=0199_2281 region=1 run=R_2009_04_23_17_54_06_ |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
752 TATATATATATATATATATATATATATATATATATATATATATATATATATAGTACGTAC |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
753 GTACG |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
754 >FUOMOGO01AYV8U length=49 xy=0280_1324 region=1 run=R_2009_04_23_17_54_06_ |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
755 ATATATATATATATATATATATATATATATATATATATATATATATATA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
756 >FUOMOGO01AYV9X length=40 xy=0280_1363 region=1 run=R_2009_04_23_17_54_06_ |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
757 TATATATATATATATATATATATATATATATATATATATA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
758 >FUOMOGO01AUX4M length=40 xy=0235_1460 region=1 run=R_2009_04_23_17_54_06_ |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
759 TATATATATATATATATATATATATATATATATATATATA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
760 >FUOMOGO01AWOTU length=54 xy=0255_0800 region=1 run=R_2009_04_23_17_54_06_ |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
761 ATATATATATATATATATATATATATATATATATATATATATATATATATAGTA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
762 >FUOMOGO01A11TC length=66 xy=0316_1054 region=1 run=R_2009_04_23_17_54_06_ |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
763 ATATATATATATATATATATATATATATATATATATATATATATATATATATAGTACGTA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
764 CGTACG |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
765 >FUOMOGO01ASRJP length=401 xy=0210_2019 region=1 run=R_2009_04_23_17_54_06_ |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
766 TATATATATATATATATATATATATATATATATATATATATATATATATATATAGTATAT |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
767 AGTAGTAGTAGTATATATATATATATATATATATATATATATATATATATATATATATAT |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
768 ATATATATATATATATATATATATATATATATATATATATATATATATATATATATATAT |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
769 ATATATATATATATATATATATATATATATATATATATATATATATATATATATATATAT |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
770 ATATATATATATATATATATATATATATATATATATATATATATATATATATATATATAT |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
771 ATATATATATATATATATATATATATATATATATATATATATATATATATATATATATAT |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
772 ATATATATATATATATATATATATATATATATATATATATA |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
773 >FUOMOGO01AU1ZH length=67 xy=0236_2363 region=1 run=R_2009_04_23_17_54_06_ |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
774 TATATATATATATATATATATATATATATATATATATATATATATATATATATAGTACGT |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
775 ACGTACG |
ad2b274663f8
planemo upload for repository https://github.com/phac-nml/galaxy_tools commit 3f9ae719338c7c8db81d645b8ee09727e2d9ce23
nml
parents:
diff
changeset
|
776 =cut |