changeset 14:feecd33c8390 draft

"planemo upload for repository https://github.com/GReD-Clermont/CLIFinder/ commit 96ee8f4901f2938dae7befb1e41c697628c22f54"
author pierre.pouchin
date Tue, 11 Feb 2020 09:28:56 -0500
parents 7978868868de
children 6d7caeea1e74
files CLIFinder.xml LICENSE LINE_html4.1.pl LINE_html_4_1.xml README.rst script/CLIFinder.pl script/CLIFinder_results.R script/js/jquery.min.js script/static/images/arrows.png script/static/images/header_bkg.png script/static/images/row_bkg.png test-data/TE.fa test-data/est-small.fa.gz test-data/genome.fa test-data/one.fastq test-data/refseq-small.txt test-data/res.html test-data/res_files/final_result_chimerae.txt test-data/res_files/first_results.txt test-data/res_files/results.txt test-data/rmsk-small.txt test-data/rna-small.fa.gz test-data/two.fastq tool-data/blastdb.loc.sample tool-data/bwa_index.loc.sample tool-data/bwa_mem_index.loc.sample tool_data_table_conf.xml.sample tool_dependencies.xml
diffstat 28 files changed, 3462 insertions(+), 1254 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/CLIFinder.xml	Tue Feb 11 09:28:56 2020 -0500
@@ -0,0 +1,306 @@
+<tool name="CLIFinder" id="CLIFinder" version="0.5.0" profile="16.01">
+    <description>Find chimerics transcripts containing LINEs sequences</description>
+    <macros>
+        <xml name="source_bwa" token_arg="Argument" token_build="Build argument" token_ref="">
+            <conditional name="source">
+                <param name="source" type="select" label="Will you select the reference database from your history or use a built-in index?">
+                    <option value="indexed">Use a built-in index</option>
+                    <option value="history">Use one from the history</option>
+                </param>
+                <when value="indexed">
+                    <param name="indices" argument="@ARG@" type="select" label="Select @REF@">
+                        <options from_data_table="bwa_mem_indexes">
+                            <filter type="sort_by" column="2" />
+                            <validator type="no_options" message="No indexes are available" />
+                        </options>
+                    </param>
+                </when>
+                <when value="history">
+                    <param name="file" argument="@ARG@" type="data" format="fasta" label="Select @REF@ from history"  help="We will also use @BUILD@"/>
+                </when>
+            </conditional>
+        </xml>
+        <xml name="source_blast" token_arg="Argument" token_build="Build argument" token_ref="">
+            <conditional name="source">
+                <param name="source" type="select" label="Will you select the reference database from your history or use a built-in index?">
+                    <option value="indexed">Use a built-in index</option>
+                    <option value="history">Generate one from the history</option>
+                    <option value="url">Download one from some URL</option>
+                </param>
+                <when value="indexed">
+                    <param name="indices" argument="@ARG@" type="select" label="Select @REF@">
+                        <options from_data_table="blastdb">
+                            <filter type="sort_by" column="2" />
+                            <validator type="no_options" message="No indexes are available" />
+                        </options>
+                    </param>
+                </when>
+                <when value="history">
+                    <param name="file" argument="@ARG@" type="data" format="fasta" label="Select @REF@ from history"  help="We will also use @BUILD@"/>
+                </when>
+                <when value="url">
+                    <param name="file" argument="@ARG@" type="text" label="Download @REF@ from URL"  help="We will not use @BUILD@: please provide link to tar.gz"/>
+                </when>
+            </conditional>
+        </xml>
+    </macros>
+    <requirements>
+        <requirement type="package" version="1.9">samtools</requirement>
+        <requirement type="package" version="2.26.0gx">bedtools</requirement>
+        <requirement type="package" version="4.0.9_p2">repeatmasker</requirement>
+        <requirement type="package" version="0.7.17">bwa</requirement>
+        <requirement type="package" version="0.0.14">fastx_toolkit</requirement>
+        <requirement type="package" version="1.20.1">wget</requirement>
+        <requirement type="package" version="5.26.2">perl</requirement>
+        <requirement type="package" version="2.50">perl-getopt-long</requirement>
+        <requirement type="package" version="0.45">perl-file-copy-recursive</requirement>
+        <requirement type="package" version="2.02">perl-parallel-forkmanager</requirement>
+        <requirement type="package" version="0.34">perl-statistics-r</requirement>
+        <requirement type="package" version="3.5.1">r-base</requirement>
+        <requirement type="package" version="1.8.5">r-plyr</requirement>
+        <requirement type="package" version="1.34.0">bioconductor-genomicranges</requirement>
+    </requirements>
+    <version_command>perl '$__tool_directory__/script/CLIFinder.pl' --version | head -n 1 | grep 'version' | cut -d ' ' -f 3</version_command>
+    <command detect_errors="aggressive"><![CDATA[
+perl '$__tool_directory__/script/CLIFinder.pl'
+
+    #if str($inputs.custom) == 'true'
+        #for $x in $inputs.fastq
+            --first '$x.first'
+            --name '$x.name'
+            --second '$x.second'
+        #end for
+    #else
+        #for $x in $inputs.fastq
+            --first '$x.first'
+            --name '$x.first.name'
+            --second '$x.second'
+        #end for
+    #end if
+
+    #if $genome.source.source == "history"
+    --ref '$genome.source.file'
+    --build_ref
+    #else
+    --ref '$genome.source.indices.fields.path'
+    #end if
+
+    #if $te.source.source == "history"
+    --TE '$te.source.file'
+    --build_TE
+    #else
+    --TE '$te.source.indices.fields.path'
+    #end if
+
+    #if str($rnadb.blast.run) == 'true'
+        #if $rnadb.blast.source.source == "indexed"
+        --rnadb '$rnadb.blast.source.indices.fields.path'
+        #else
+        --rnadb '$rnadb.blast.source.file'
+        #end if
+        #if $rnadb.blast.source.source == "history"
+        --build_rnadb
+        #end if
+    #end if
+
+    #if str($estdb.blast.run) == 'true'
+        #if $estdb.blast.source.source == "indexed"
+        --estdb '$estdb.blast.source.indices.fields.path'
+        #else
+        --estdb '$estdb.blast.source.file'
+        #end if
+        #if $estdb.blast.source.source == "history"
+        --build_estdb
+        #end if
+    #end if
+
+    --rmsk '$rmsk'
+    --refseq '$refseq'
+    --html '$chimerae'
+    --html_path '${chimerae.files_path}'
+    --size_insert '$size_insert'
+    --size_read '$size'
+    --min_unique '$min_unique'
+    --BDir '$BDir'
+    --min_L1 '$min_L1'
+    --mis_L1 '$mis_L1'
+    --threads "\${GALAXY_SLOTS:-4}"
+        ]]>
+    </command>
+    <inputs>
+        <conditional name="inputs">
+            <param name="custom" type="select" label="Use custom name for the input sequence files?">
+                <option value="true">Yes</option>
+                <option value="false" selected="true">No: the names will be extracted automatically</option>
+            </param>
+            <when value="true">
+                <repeat name="fastq" title="Input sequences" min="1">
+                    <param argument="--first" type="data" format="fastqsanger" label="First set of paired-end reads"/>
+                    <param argument="--name" type="text" value="" label="Label for the input sequences"/>
+                    <param argument="--second" type="data" format="fastqsanger" label="Second set of paired-end reads"/>
+                </repeat>
+            </when>
+            <when value="false">
+                <repeat name="fastq" title="Input sequences" min="1">
+                    <param argument="--first" type="data" format="fastqsanger" label="First set of paired-end reads"/>
+                    <param argument="--second" type="data" format="fastqsanger" label="Second set of paired-end reads"/>
+                </repeat>
+            </when>
+        </conditional>
+        <section name="genome" title="Reference genome" expanded="true">
+            <expand macro="source_bwa" arg="--ref" build="--build_ref" ref="a reference genome"/>
+        </section>
+        <section name="te" title="Transposable Elements" expanded="true">
+            <expand macro="source_bwa" arg="--TE" build="--build_TE" ref="reference TE sequences"/>
+        </section>
+        <section name="rnadb" title="RNA Blast database" expanded="true">
+            <conditional name="blast">
+                <param name="run" type="select" label="Should blast be ran?">
+                    <option value="true">Yes</option>
+                    <option value="false">No</option>
+                </param>
+                <when value="true">
+                    <expand macro="source_blast" arg="--rnadb" build="--build_rnadb" ref="reference RNA sequences"/>
+                </when>
+                <when value="false" />
+            </conditional>
+        </section>
+        <section name="estdb" title="EST Blast database" expanded="true">
+            <conditional name="blast">
+                <param name="run" type="select" label="Should blast be ran?">
+                    <option value="true">Yes</option>
+                    <option value="false">No</option>
+                </param>
+                <when value="true">
+                    <expand macro="source_blast" arg="--estdb" build="--build_estdb" ref="reference EST sequences"/>
+                </when>
+                <when value="false" />
+            </conditional>
+        </section>
+        <param argument="--rmsk" name="rmsk" type="data" format="tabular" label="Tab-delimited text file (with headers) containing reference repeat sequences (e.g. rmsk track from UCSC)"/>
+        <param argument="--refseq" name="refseq" type="data" format="tabular" label="Tab-delimited file (with headers) containing reference genes (e.g. RefGene.txt from UCSC)"/>
+        <param name="BDir" type="select" >
+            <option value="0">Undirectional libraries</option>
+            <option value="1">TEs sequences in first read in pair</option>
+            <option value="2">TEs sequences in second read in pair</option>
+        </param>
+        <param argument="--size_read" name="size" type="integer" value="100" label="Reads size"/>
+        <param argument="--size_insert" name="size_insert" type="integer" value="250" label="Maximum insert size (bp)"/>
+        <param argument="--min_L1" name="min_L1" type="integer" value="50" label="Minimun bp mapping on selected TEs database"/>
+        <param argument="--mis_L1" name="mis_L1" type="integer" value="2" label="Number of mismatches tolerated in TEs mapping sequences"/>
+        <param argument="--min_unique" name="min_unique" type="integer" value="33" label="minimum consecutive bp corresponding to a unique sequence"/>
+    </inputs>
+    <outputs>
+        <data format="html" name="chimerae" label="${tool.name}_on_${on_string}"/>
+    </outputs>
+    <tests>
+        <test>
+            <conditional name="inputs">
+                <param name="custom" value="true"/>
+                <repeat name="fastq">
+                    <param name="first" value="one.fastq" ftype="fastqsanger" />
+                    <param name="name" value="test"/>
+                    <param name="second" value="two.fastq" ftype="fastqsanger" />
+                </repeat>
+            </conditional>
+            <section name="genome">
+                <conditional name="source">
+                    <param name="source" value="history" />
+                    <param name="file" value ="genome.fa" />
+                </conditional>
+            </section>
+            <section name="te">
+                <conditional name="source">
+                    <param name="source" value="history" />
+                    <param name="file" value ="TE.fa" />
+                </conditional>
+            </section>
+            <section name="rnadb">
+                <conditional name="blast">
+                    <param name="run" value="true" />
+                    <conditional name="source">
+                        <param name="source" value="history" />
+                        <param name="file" value ="rna-small.fa.gz" />
+                    </conditional>
+                </conditional>
+            </section>
+            <section name="estdb">
+                <conditional name="blast">
+                    <param name="run" value="true" />
+                    <conditional name="source">
+                        <param name="source" value="history" />
+                        <param name="file" value ="est-small.fa.gz" />
+                    </conditional>
+                </conditional>
+            </section>
+            <param name="rmsk" value="rmsk-small.txt" />
+            <param name="refseq" value="refseq-small.txt" />
+            <param name="BDir" value="0" />
+            <param name="size" value="100" />
+            <param name="size_insert" value="500" />
+            <param name="min_L1" value="30" />
+            <param name="mis_L1" value="6" />
+            <param name="min_unique" value="30" />
+            <output name="chimerae" file="res.html" compare="diff" lines_diff="0">
+                <extra_files type="file" name="results.txt" value="res_files/results.txt" compare="diff" />
+                <extra_files type="file" name="first_results.txt" value="res_files/first_results.txt" compare="diff" />
+                <extra_files type="file" name="final_result_chimerae.txt" value="res_files/final_result_chimerae.txt" compare="diff" />
+            </output>
+        </test>
+    </tests>
+    <help>
+        <![CDATA[
+**CLIFinder version 0.5.0**
+
+**Usage:**
+
+    CLIFinder.pl --first [first fastq of paired-end set 1] --name [name 1] --second [second fastq of paired-end set 1] [--first [first fastq of paired-end set 2] --name [name 2] --second [second fastq of paired-end set 2] ...] --ref [reference genome] [--build_ref] --TE [transposable elements] [--build_TE] --html [results.html] --html-path [results directory][options]
+
+**Arguments:**
+  --first [fastq]     First fastq file to process from paired-end set
+
+  --name [name]       Name of the content to process
+
+  --second [fastq]    Second fastq file to process from paired-end set
+
+  --ref [reference]   Fasta file containing the reference genome
+
+  --TE [TE]           Fasta file containing the transposable elements
+
+  --rmsk [txt file]   Tab-delimited text file (with headers) containing reference repeat sequences (e.g. rmsk track from UCSC)
+
+  --refseq [txt file] Tab-delimited file (with headers) containing reference genes (e.g. RefGene.txt from UCSC)
+
+  --html [file]       Main HTML file where results will be displayed
+
+  --html-path [path]  Folder where results will be stored
+
+For any fasta file, if a bwa index is not provided, you should build it through the corresponding *--build_[element]* argument
+
+**Options:**
+    --rnadb [RNA db]    Blast database with RNA sequences (optional)
+  
+    --estdb [EST db]    Blast database with RNA sequences (optional)
+
+    --size_read [INT]   Size of reads
+
+    --BDir [0|1|2]      Orientation of reads (0: undirectional libraries, 1: TEs sequences in first read in pair, 2: TEs sequences in second read in pair)
+
+    --size_insert [INT] Maximum size of insert tolerated between R1 and R2 for alignment on the reference genome
+
+    --min_L1 [INT]       Minimum number of bp matching for L1 mapping
+
+    --mis_L1 [INT]      Maximum number of mismatches tolerated for L1 mapping
+
+    --min_unique [INT]  Number of consecutive bp not annotated by RepeatMasker
+
+    --threads [INT]     Number of threads (default: 1)
+
+For Blast database files, if a fasta is provided, the database can be built with '--build_[db]'. Otherwise, provide a path or URL. "tar(.gz)" files are acceptable, as well as wild card (rna*) URLs.
+
+        ]]>
+    </help>
+    <citations>
+        <citation type="doi">10.1093/bioinformatics/btx671</citation>
+    </citations>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LICENSE	Tue Feb 11 09:28:56 2020 -0500
@@ -0,0 +1,674 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    {one line to give the program's name and a brief idea of what it does.}
+    Copyright (C) {year}  {name of author}
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    {project}  Copyright (C) {year}  {fullname}
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
--- a/LINE_html4.1.pl	Wed Jan 31 09:59:07 2018 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1101 +0,0 @@
- #/usr/bin/perl
-
-################################################
-#Declaration of necessary libraries#############
-################################################ 
-
-use strict;
-use warnings;
-use Sys::CPU;
-use Parallel::ForkManager;
-use POSIX;
-use Statistics::R ;
-use Getopt::Long;
-use File::Basename;
-
-################################################
-#Declaration of necessary global variables######
-################################################
-
-my (@fastq1, @fastq2, @name, $html, $size_reads, $ref, $TE, $build_index, $build_TE, $html_repertory, $maxInsertSize, $prct, $help, $image, $Bdir, $minL1, $mis_L1);
-
-#####################################################################
-#Definition options of execution according to the previous variables#
-#####################################################################
-
-GetOptions (
-"first:s"  =>  \@fastq1,
-"second:s"  =>  \@fastq2,
-"name:s"  =>  \@name,
-"html:s"  => \$html,
-"TE:s" => \$TE,
-"ref:s" => \$ref,
-"build_TE" => \$build_TE,
-"build_index" => \$build_index,
-"pourcentage:i" => \$prct,
-"size_insert:i" => \$maxInsertSize,
-"size_read:i" => \$size_reads,
-"html_path:s" => \$html_repertory,
-"image:s" => \$image,
-"BDir:i" => \$Bdir,
-"minL1:i" => \$minL1,
-"mis_L1:i" => \$mis_L1,
-);
-my $iprct = 100 - (($prct / $size_reads)*100) ;
-my $mis_auth = $size_reads - $minL1 + $mis_L1 ;
-my $eprct = ($iprct * $size_reads) /100; 
-my $dprct = ((100-$iprct) * $size_reads) / 100;
-
-################################################
-#Construct index of ref and TE if doesn't exist#
-################################################
-
-`(bwa index $ref) 2> /dev/null ` if ($build_index);
-`(bwa index $TE) 2> /dev/null ` if ($build_TE);
-
-############################################
-#Create repository to store resulting files#
-############################################
-
-mkdir $html_repertory;
-
-######################################################
-#Define  number of Cpu process we can use = total /5 #
-######################################################
-
-my $cpu = int(Sys::CPU::cpu_count() /5) ;
-
-##########################################
-#Define  hash                            #
-##########################################
-
-my %frag_exp_id;
-
-##########################
-#Data file we have to use#
-##########################
-
-my $NCBI_est = $html_repertory.'/est_human'; # NCBI Human est
-my $NCBI_rna = $html_repertory.'/rna'; # NCBI Human rna
-my $rmsk = $html_repertory.'/rmsk.bed'; # UCSC repeat sequences
-####################################
-# Redirection standart error output#
-####################################
-
-my $file = $html_repertory.'/report.txt';
-open STDERR, '>', $file or die "Can't redirect STDERR: $!";
-
-##############################
-# Analyse of each fastq file #
-##############################
-
-
-my @garbage;  my $num = 0;
-foreach my $tabR (0..$#fastq1)
-{
-  ###################################################
-  # Paired end mapping against L1 promoter sequences#
-  ###################################################
-  
-  print STDERR "alignement of $name[$tabR] to L1\n";
-  my $sam = $html_repertory.'/'.$name[$tabR]."_L1.sam"; push(@garbage, $sam);
-  align_paired( $TE, $fastq1[$tabR], $fastq2[$tabR], $sam, $cpu, $mis_auth);
-  print STDERR "alignement done\n";
-  
-  ##################################################
-  # Creation of two fastq for paired halfed mapped:#
-  # - _1 correspond to sequences mapped to L1      #
-  # - _2 correspond to sequences unmapped to L1    #
-  ##################################################
-  print STDERR "getting pairs with one mate matched to L1 and the other mate undetected by repeatmasker as a repeat sequence\n";
-  
-  my $out_ASP_1 = $html_repertory.'/'.$name[$tabR]."_1.fastq"; push(@garbage, $out_ASP_1);
-  my $out_ASP_2 = $html_repertory.'/'.$name[$tabR]."_2.fastq"; push(@garbage, $out_ASP_2);
-  
-  ##split mate that matched to L1 and others##
-  my ($ASP_readsHashR, $half_num_out) = get_half($sam); 
-  # $ASP_reads{$line[0]}[0] mapped - $ASP_reads{$line[0]}[1] unmapped
-  
-  ##pairs obtained after repeatmasker on the other mate## 
-  my $left = sort_out($cpu, $out_ASP_1, $out_ASP_2, $ASP_readsHashR);
-
-  print STDERR "number of half mapped pairs : $half_num_out\n";
-  print STDERR "number of pairs after repeatmasker: $left\n";
-  
-  ##################################################
-  # Alignment of halfed mapped pairs on genome     #
-  ##################################################
-  print STDERR "alignement of potential chimeric sequences to the genome\n";
-  $sam = $html_repertory.'/'.$name[$tabR]."_genome.sam";  
-  push(@garbage, $sam);
-  align_genome( $ref, $out_ASP_1, $out_ASP_2, $sam, $cpu);
-  print STDERR "alignement done\n";
-  
-  ##compute the number of sequences obtained after alignement ##
-  
-  $left = `samtools view -Shc $sam 2> /dev/null`;
-  chomp $left; $left = $left/2;
-  print STDERR "number of sequences....: $left\n";
-
-  ##################################################
-  # Create bedfiles of potential chimerae          #
-  # and Know repeat sequences removed              #
-  ##################################################
-  
-  print STDERR "looking for chimerae\n";
-  results($html_repertory, $sam, $name[$tabR], \%frag_exp_id, $num);
-  $num++;
-  
-}
-
-
-
-##define files variables ##
-
-my $repfirst = $html_repertory.'/first.bed'; push(@garbage,$repfirst);
-my $repsecond = $html_repertory.'/second.bed'; push(@garbage,$repsecond);
-my $repMfirst = $html_repertory.'/firstM.bed'; push(@garbage,$repMfirst);
-my $repMsecond = $html_repertory.'/secondM.bed'; push(@garbage,$repMsecond);
-#my $covRepMsecond = $html_repertory.'/covSecondM.bed'; push(@garbage,$covRepMsecond);
-
-
-##Concate all files for first and second mate results ##
-
-`cat $html_repertory/*-first.bed > $repfirst`; #*/
-`cat $html_repertory/*-second.bed > $repsecond`; #*/
-
-## Sort Files and generate files that merge reads in the same locus ##
-`bedtools sort -i $repfirst 2> /dev/null | bedtools merge -scores max -d 100 -s -nms -i /dev/stdin > $repMfirst  2> /dev/null`;
-`bedtools sort -i $repsecond  2> /dev/null | bedtools merge  -scores max -d 100 -s -nms -i /dev/stdin > $repMsecond  2> /dev/null`;
-
-my (%Gviz, %frag_uni, @second_R, @second_exp, @results);
-my $merge_target = $html_repertory.'/target_merged.bed'; push(@garbage, $merge_target);
-my $merge = $html_repertory.'/merged.bed'; push(@garbage, $merge);
-
-open (my $mT, ">".$merge_target) || die "cannot open $merge_target\n";
-open (my $m, ">".$merge) || die "cannot open $merge\n";
-open (my $in, $repMsecond) || die "cannot open secondM\n";
-my $cmp = 0;
-while (<$in>)
-{
-  chomp $_;
-  my @tmp = (0) x scalar(@fastq1);
-  my @line = split /\t/, $_;
-  my @names =split /;/, $line[3];
-  foreach my $n (@names){$n =~/(.*?)\/[12]/; $frag_uni{$1} = $cmp; $tmp[$frag_exp_id{$1}]++; }
-  $second_exp[$cmp] = \@tmp;
-  $cmp++;
-  push @second_R, [$line[0],$line[1],$line[2],$line[5]];
-}
-
-$cmp = 0;
-open ($in, $repMfirst) || die "cannot open firstM\n";
-while (<$in>)
-{
-  chomp $_;
-  my %sec;
-  my @line = split /\t/, $_;
-  my @names =split /;/, $line[3];
-  my @tmp = (0) x scalar(@fastq1);
-  foreach my $n (@names){$n =~/(.*?)\/[12]/; $tmp[$frag_exp_id{$1}]++; }
-  foreach my $n (@names)
-  {
-    $n =~/(.*?)\/[12]/;
-    unless (exists ($sec{$frag_uni{$1}}) )
-    {
-      my @lmp = ($line[0], $line[1], $line[2], $line[5]);
-      foreach my $exp_N (@tmp){ push @lmp, $exp_N;}
-      push (@lmp, $second_R[$frag_uni{$1}]->[0], $second_R[$frag_uni{$1}]->[1], $second_R[$frag_uni{$1}]->[2], $second_R[$frag_uni{$1}]->[3]);
-      foreach my $exp_N (@{$second_exp[$frag_uni{$1}]}){ push @lmp, $exp_N;}
-      
-      my $name = $cmp.'-'.$second_R[$frag_uni{$1}]->[0].'-'.$second_R[$frag_uni{$1}]->[1].'-'.$second_R[$frag_uni{$1}]->[2];
-      print $mT $second_R[$frag_uni{$1}]->[0]."\t".$second_R[$frag_uni{$1}]->[1]."\t".$second_R[$frag_uni{$1}]->[2]."\t$name\t29\t".$second_R[$frag_uni{$1}]->[3]."\n";
-      
-      my ($b, $e) = (0,0);
-      if ($line[1] < $second_R[$frag_uni{$1}]->[1])
-      {
-        $b = $line[1] - 1000; $e = $second_R[$frag_uni{$1}]->[2] + 1000;
-        $name = $cmp.'-'.$line[0].'-'.$b.'-'.$e;
-        print $m $line[0]."\t".$b."\t".$e."\t$name\t29\t".$second_R[$frag_uni{$1}]->[3]."\n";
-      }
-      else
-      {
-        $b = $second_R[$frag_uni{$1}]->[1] - 1000; $e = $line[2] + 1000;
-        $name = $cmp.'-'.$line[0].'-'.$b.'-'.$e;
-        print $m $line[0]."\t".$b."\t".$e."\t$name\t29\t".$second_R[$frag_uni{$1}]->[3]."\n";
-      }
-      $results[$cmp] = \@lmp;
-      $cmp++;
-    }
-    $sec{$frag_uni{$1}} = undef;
-  }
-}
-close $mT; close $m;
-
-my $fasta = $html_repertory.'/target_merged.fasta'; push(@garbage, $fasta);
-my $extend = $html_repertory.'/extend.fasta'; push(@garbage, $extend);
-
-`bedtools getfasta -name -fi $ref -bed $merge -fo $extend`;
-`bedtools getfasta -name -fi $ref -bed $merge_target -fo $fasta`;
-
-################################################
-#Blast against human rna and est               #
-################################################
-
-##get databases for est and rna
-`wget -r -nH -nd -np --accept=est*  https://galaxy.gred-clermont.fr/clifinder/ -P $html_repertory `;
-`wget -r -nH -nd -np --accept=rna*  https://galaxy.gred-clermont.fr/clifinder/ -P $html_repertory `;
-
-
-print STDERR "blast against human rna\n";
-my $tabular = $html_repertory."/chimerae_rna.tab"; push(@garbage, $tabular);
-blast($NCBI_rna, $fasta, $tabular, $cpu);
-my $rna = extract_blast($tabular);
-
-print STDERR "blast against human est\n";
-my $tabular2 = $html_repertory."/chimerae_est.tab";push(@garbage, $tabular2);
-blast($NCBI_est, $fasta, $tabular, $cpu);
-my $est = extract_blast($tabular);
-
-################################################
-#Create Results html file                      #
-################################################
-print STDERR "save result in file\n";
-save_csv();
-print STDERR "create HTML\n";
-html_tab($rna,$est,$html_repertory);
-$extend = $extend.'*';
-push(@garbage,glob($extend));
-unlink @garbage;
-my $toErase = $html_repertory.'\rna*';
-unlink glob "$toErase";
-$toErase = $html_repertory.'\est*';
-unlink glob "$toErase";
-  
-
-print STDERR "Job done!\n";
-
-########################################### END MAIN ##########################################################
-
-
-##############################################################################################################
-############################################     FUNCTIONS   #################################################   
-##############################################################################################################
-
-
-
-############################################################
-##Function that aligned paired-end reads on a genome########
-############################################################
-## @param:												   #
-##       $index: referential genome						   #
-##       $fasq1: first paired end file					   #
-##       $fasq2: second paired end file				       #
-##       $sam:	Alignment output file 				       #
-##       $number_of_cpus: Number of Cpu used			   #
-############################################################
-
-sub align_genome
-{
-  my ($index, $fastq1, $fastq2, $sam, $number_of_cpus) = @_ ;
-  my @L_garbage =();
-  my $sai1 = $sam."_temporary.sai1"; push @L_garbage,$sai1;
-  my $sai2 = $sam."_temporary.sai2"; push @L_garbage,$sai2;
-  `bwa aln -o4 -e1000  -t $number_of_cpus $index $fastq1 > $sai1 2> /dev/null`;
-  `bwa aln -o4 -e1000 -t $number_of_cpus $index $fastq2 > $sai2 2> /dev/null`;
-  ## -A force the insertion size
-  `bwa sampe -s -A -a $maxInsertSize $index  $sai1 $sai2 $fastq1 $fastq2 2> /dev/null | samtools view -F4 -f 2  -Sh /dev/stdin > $sam`;
-  unlink @L_garbage;
-}
-
-
-############################################################
-##Function get_half get alignement on TE                 ###
-############################################################
-## @param:												   #
-##       $sam: Name of alignement file   				   #
-##														   #	
-## @return:												   #
-##		 $ASP_readsHashR: table to store sequences         #
-##		 $half_num_out:	 number of alignment saved         #
-############################################################
-
-sub get_half
-{
-  ## store name of file	
-  my $sam = shift; 
-  open(my $fic, $sam) || die "cannot open sam file! $!\n"; ## Open file
-  my (%ASP_reads); my $cmp = 0; ## Declare variables for
-  my $sequence = '';
-  
-  ##read file##
-  while(<$fic>)
-  {
-    chomp $_;
-    ##We don't consider lines of sam files that are in header##
-    next if ($_ =~ /^\@[A-Za-z][A-Za-z](\t[A-Za-z][A-Za-z0-9]:[ -~]+)+$/ || $_ =~ /^\@CO\t.*/ );
-    ##We split line in several part##
-    my @line = split (/\t/,$_);
-   
-	##Find if alignemets have min_L1 consecutives bases mapped on R1 ##
-	##Corriger enlever la condition mis_L1 = 0 ##   
-#   if ($mis_L1 != 0)
-#   {
-     if ($_ =~/NM:i:(\d+)\t.*MD:Z:(.*)/)
-     {
-        my $misT = $1; my $MD = $2; my $maxT = 0;
-        $MD = $1 if ($MD =~ /(.*)\t/);
-        $MD =~ s/\^//g;
-        my @tab = split /[ATCG]/,$MD;
-        my $tot = 0;
-        my $accept = 0;
-        if ($misT <= $mis_L1){$accept = 1;}
-        else
-        {
-          if ( $mis_L1 > scalar(@tab) ) { $maxT = scalar(@tab); }
-          else{ $maxT = $mis_L1; }
-          for (my $t = 0; $t < $maxT ; $t++)
-          {
-            $tot += $tab[$t] if $tab[$t] ne '';
-          }
-          $accept = 1 if $tot >= $minL1;
-        }
-        ## if sequence is not accepted we go to the next sequence ##
-        next if $accept == 0;
-     }
-#   }
-    
-    ##looking for flag of the alignment and keep only good reads##
-    ##Find if it aligns on R1 or on R2##
-    
-    if ($line[1] == 73 || $line[1] == 89 || $line[1] == 117 || $line[1] == 69  || $line[1] == 133 || $line[1] == 181 || $line[1] == 153|| $line[1] == 137)
-    {
-      if ( $Bdir == 0 || ($Bdir == 1 && $line[1] & 64) || ($Bdir = 2 && $line[1] & 128))
-      {
-        $cmp++;
-        $sequence = $line[9];
-        ## if sequence is reversed aligned then reverse sequence ## 
-        if ($line[1] & 16)
-        {
-          $sequence =reverse($sequence);
-          $sequence =~ tr/atgcuATGCU/tacgaTACGA/;
-        }
-        ## define table contains ## 
-        $ASP_reads{$line[0]} = [undef,undef] unless exists( $ASP_reads{$line[0]} );
-        
-        ##split if first mate (R1) is mapped on L1 or not (R2) ## 
-        if ($line[1] & 8)
-        {
-          $ASP_reads{$line[0]}[0] = "\@".$line[0]."\n".$sequence."\n+\n".$line[10]."\n";
-        }
-        else
-        {
-          $ASP_reads{$line[0]}[1] = "\@".$line[0]."\n".$sequence."\n+\n".$line[10]."\n";
-        }
-      }
-    }
-  }
-  close $fic;
-  return ( \%ASP_reads, $cmp);
-}
-
-############################################################
-##Function sort_out: extract paired end reads            ###
-############################################################
-## @param:												   #
-##       $cpus:	number of Cpu used						   #
-##       $out1:	output file accepted 1				       #
-##       $out2:	output file accepted 2			           #
-##       $readsHashTabR: reads to consider 				   #
-############################################################
-
-sub sort_out
-{
-  my ($cpus, $out1, $out2, $readsHashTabR) = @_;
-  my ($name,$path) = fileparse($out2,'.fastq');
-  my %repeat;
-  my @garbage = (); my $cmp = 0;
-  my $repout = $html_repertory.'/'.$name."_repout/";
-  my $fa = $html_repertory.'/'.$name.".fa"; push (@garbage,$fa );
-  my $second = $html_repertory.'/'.$name."_temporary.fastq";  push (@garbage,$second);
-  mkdir $repout;
-  my %notLine;
-  
-  ##Write on file containing of readssHashTabR
-  
-  open(my $tmp, ">".$second) || die "cannot open temp file $second\n";
-  while ( my ($k,$v) = each %{$readsHashTabR} )
-  {
-    print $tmp ${$v}[1] if defined(${$v}[1]);
-  }
-  close $tmp;
-  
-  ## Transform fastq file to fasta
-  
-  `fastq_to_fasta -i $second -o $fa -Q33`;
-  
-  ##Launch RepeatMasker on fasta file
-  
-  `RepeatMasker -s -pa $cpus -dir $repout -species human $fa`;
-  my $repfile = $repout.$name.".fa.out";
-  open (my $rep, $repfile) || die "cannot open $repfile $!\n";
-  while(<$rep>)
-  {
-    chomp;
-    ## test the percent of repeats ##
-    my $string = $_;
-    $string =~ s/^\s+//;
-    next unless ($string =~ /^\d/);
-    $string =~ s/\s+/ /g;
-    my @line = split (' ',$string);
-    if ( exists($repeat{$line[4]}) )
-    {
-      $repeat{$line[4]}->[0] = $line[5] if $repeat{$line[4]}->[0] > $line[5];
-      $repeat{$line[4]}->[1] = $line[6] if $repeat{$line[4]}->[1] < $line[6];
-    }
-    else{ $repeat{$line[4]} = [$line[5],$line[6]];}
-  }
-  close $rep;
-  
-  ## store in table if pair passed the repeat test ##
-  while (my ($k, $v) = each %repeat)
-  {
-    $notLine{$k} = 1 unless ($v->[0] > $dprct || $v->[1] < $eprct);
-  }
-  
-  ##write resulting reads in  both files for paired ##
-  open(my $accepted_1, ">".$out1 ) || die "cannot open $out1 file $!\n";
-  open(my $accepted_2, ">".$out2 ) || die "cannot open $out2 file $!\n";
-  while ( my ($k,$v) = each %{$readsHashTabR} )
-  {
-    if ( defined (${$v}[0]) && defined (${$v}[1]) )
-    {
-      unless (defined ($notLine{$k}) && $notLine{$k} == 1)
-      {
-        $cmp++;
-        print $accepted_1 ${$v}[0];
-        print $accepted_2 ${$v}[1];
-      }
-    }
-  }
-  close $accepted_1; close $accepted_2;
-  
-  ##drop files and directories generated by repeatmasker##
-  my $toErase = $repout.'*';
-  unlink glob "$toErase";
-  unlink @garbage; rmdir $repout;
-  return $cmp;
-}
-
-############################################################
-##Function that aligned paired-end reads on a referential###
-############################################################
-## @param:												   #
-##       $index: referential file						   #
-##       $fasq1: first file paired end reads			   # 
-##       $fasq2: second file paired end reads			   #
-##       $sam: output alignment file				       #
-##       $number_of_cpus: number of CPU used			   #
-##		 $mis: tolerated mismatches					       #
-############################################################
-sub align_paired
-{
-  my ($index, $fastq1, $fastq2, $sam, $number_of_cpus, $mis) = @_ ;
-  my @garbage = ();
-  my $sai1 = $sam."_temporary.sai1"; push @garbage,$sai1;
-  my $sai2 = $sam."_temporary.sai2"; push @garbage,$sai2;
-  
-  ##alignement with bwa
-  
-  `bwa aln -n $mis -t $number_of_cpus $index $fastq1 > $sai1 2> /dev/null`;
-  `bwa aln -n $mis -t $number_of_cpus $index $fastq2 > $sai2 2> /dev/null`;
-  `bwa sampe $index  $sai1 $sai2 $fastq1 $fastq2  > $sam 2> /dev/null`;
-  
-  ## delete temporary single aligned files
-  unlink @garbage; 
-}
-
-############################################################
-##Function that aligned reads on a referential           ###
-############################################################
-## @param:												   #
-##       $index: referential file						   #
-##       $fasq: reads file								   #
-##       $sam:	output alignment file				       #
-##       $number_of_cpus: number of CPU used			   #
-############################################################
-
-sub align
-{
-  my ($index, $fastq, $sam, $number_of_cpus ) = @_ ;
-  `bwa aln -o4 -e$maxInsertSize -t $number_of_cpus $index $fastq  2> /dev/null | bwa samse $index /dev/stdin $fastq > $sam  2> /dev/null`;
-}
-
-############################################################
-##Function results computes bed files for result         ###
-############################################################
-## @param:												   #
-##       $out_repository: repository to store results	   #
-##       $file:	sam file resulting of alignement		   #
-##       $name:	name of paireds end reads file             #
-##       $hashRef: store number for each first read value  #
-##       $ps: number of the paired end file		           #
-############################################################
-
-sub results
-{
-  my ($out_repertory, $file, $name, $hashRef,$ps) = @_;
-  my $namefirst = $out_repertory.'/'.$name.'-first.bed'; push(@garbage, $namefirst);
-  my $namesecond = $out_repertory.'/'.$name.'-second.bed'; push(@garbage, $namesecond);
-  
-  ##get database forrepeatmasker
-  `wget https://galaxy.gred-clermont.fr/clifinder/rmsk.bed -P $out_repository `; push(@garbage, $rmsk);
-  
-  ## store reads mapped in proper pair respectively  first and second in pair in bam files and transform in bed files## 
-  `samtools view -Sb -f66 $file 2> /dev/null | bedtools bamtobed -i /dev/stdin > temp_name_first 2> /dev/null`;
-  `samtools view -Sb -f130 $file 2> /dev/null | bedtools bamtobed -i /dev/stdin > temp_name_second 2> /dev/null`;
-  
-  ##compute converage of second mate on rmsk##
-  my $baseCov = 0;
-  my %IdCov = ();
-  my @coverage = `bedtools coverage -b temp_name_second -a $rmsk`;
-  
-  
-  ## store coverage fraction ##
-  foreach my $covRmsk (@coverage)
-  {
-    chomp $covRmsk;
-    my @split_cov = split /\t/, $covRmsk;
-    ##generate identifier for IdCov ##
-    $split_cov[3] =~ /(.*?)\/[12]/;
-    ##store value in IdCov ##
-    if (!exists($IdCov{$1}))
-    {
-      $IdCov{$1} = $split_cov[-1];
-    }
-    else
-    {
-      IdCov{$1} = $split_cov[-1] if $split_cov[-1] > IdCov{$1};
-    }
-  }
-  
-  ## get only  first mate that have less tant $iprct repeats ##
-  open (my $tmp_fi, 'temp_name_first') || die "cannot open $namefirst!\n";
-  open (my $nam_fi, ">".$namefirst) || die "cannot open $namefirst!\n";
-  while (<$tmp_fi>)
-  {
-    my @line = split /\t/, $_;
-    $line[3] =~ /(.*?)\/[12]/;
-    
-    if ($IdCov{$1} <= $iprct/100)
-    {
-      print $nam_fi $_;
-      
-      ${$hashRef}{$1}= $ps;
-    }
-  }
-  close $tmp_fi; close $nam_fi;
-  
-  
-  ## get only  second mate that have less than $iprct repeats ##
-
-  open (my $tmp_sec, 'temp_name_second') || die "cannot open $namesecond!\n";
-  open (my $nam_sec, ">".$namesecond) || die "cannot open $namesecond!\n";
-  while (<$tmp_sec>)
-  {
-    my @line = split /\t/, $_;
-    $line[3] =~ /(.*?)\/[12]/;
-    if ($IdCov{$1} <= $iprct/100)
-    {
-      print $nam_sec $_;
-    }
-  }
-  close $tmp_sec; close $nam_sec;
-}
-
-#sub results
-#{
-#  my ($out_repertory, $file, $name, $hashRef,$ps) = @_;
-#  my $namefirst = $out_repertory.'/'.$name.'-first.bed'; push(@garbage, $namefirst);
-#  my $namesecond = $out_repertory.'/'.$name.'-second.bed'; push(@garbage, $namesecond);
-#  `samtools view -Sb -f66 $file 2> /dev/null | bedtools bamtobed -i /dev/stdin > $namefirst 2> /dev/null`;
-#  `samtools view -Sb -f130 $file 2> /dev/null | bedtools bamtobed -i /dev/stdin > $namesecond 2> /dev/null`;
-#  open( my $in, $out_repertory.'/'.$name.'-first.bed') || die "cannot open first read bed\n";
-#  while (<$in>)
-#  {
-#    my @line = split /\t/, $_;
-#    $line[3] =~ /(.*?)\/1/;
-#    ${$hashRef}{$1}= $ps;
-#  }
-#}
-
-
-############################################################
-##Function blast: blast nucleotide sequences on ref      ###
-############################################################
-## @param:												   #
-##       $db:database where to search					   #
-##       $fasta: file containing nucleotide sequences	   #
-##       $tabular: out file name						   #
-##       $cpu:	Number of Cpu used					       #
-############################################################
-
-
-
-sub blast
-{
-  my ($db, $fasta, $tabular, $cpus) = @_;
-  `blastn -db $db -query $fasta -num_threads $cpus -out $tabular -outfmt 6 -evalue 10e-10`;
-}
-
-############################################################
-##Function extract_blast: extract result from blast      ###
-############################################################
-## @param:  											   #
-##       $file: Name of sequences file   				   #
-## @return: hash that contains sequences                   #
-############################################################
-
-
-sub extract_blast
-{
-  my $file = shift;
-  my %hash = ();
-  open (my $f, $file) || die "cannot open $file\n";
-  while (<$f>)
-  {
-    chomp $_;
-    my ($seq,$id) = split /\t/,$_;
-    $seq = $1 if ($seq =~ /(\d+)-(.*?)-(\d+)-(\d+)/);
-    $hash{$seq} = [] unless exists $hash{$seq};
-    push @{$hash{$seq}}, $id;
-  }
-  close $f;
-  return \%hash;
-}
-
-############################################################
-##Function print_header: header of html file             ###
-############################################################
-## @param:												   #
-############################################################
-
-
-
-sub print_header
-{
-  my $fileR = shift; my $title = shift;
-  print $fileR "<!DOCTYPE html> <html> <head> <title>$title</title>";
-  print $fileR "<style type=\"text/css\">
-  body { font-family:Arial, Helvetica, Sans-Serif; font-size:0.8em;}
-  #report { border-collapse:collapse;}
-  #report h4 { margin:0px; padding:0px;}
-  #report img { float:right;}
-  #report ul { margin:10px 0 10px 40px; padding:0px;}
-  #report th { background:#7CB8E2 url(header_bkg.png) repeat-x scroll center left; color:#fff; padding:7px 15px; text-align:left;}
-  #report td { background:#C7DDEE none repeat-x scroll center left; color:#000; padding:7px 15px; }
-  #report tr.odd td { background:#fff url(row_bkg.png) repeat-x scroll center left; cursor:pointer; }
-  #report div.arrow { background:transparent url(arrows.png) no-repeat scroll 0px -16px; width:16px; height:16px; display:block;}
-  #report div.up { background-position:0px 0px;}
-  </style>\n";
-  print $fileR " <script src=\"./jquery.min.js\" type=\"text/javascript\"></script>\n";
-  print $fileR "<script type=\"text/javascript\">
-  \$(document).ready(function(){
-    \$(\"#report tr:odd\").addClass(\"odd\");
-    \$(\"#report tr:not(.odd)\").hide();
-    \$(\"#report tr:first-child\").show();
-    
-    \$(\"#report tr.odd\").click(function(){
-    \$(this).next(\"tr\").toggle();
-    \$(this).find(\".arrow\").toggleClass(\"up\");
-  });
-  //\$(\"#report\").jExpand();
-});
-</script>";
-print $fileR "</head> <body> <table id=\"report\" >\n";
-}
-
-############################################################
-##Function html_tab: definition of html file             ###
-############################################################
-## @param:												   #	
-##		 $html_repository: repository to store results	   #
-##       $rna: results for know RNA						   #
-##       $est: results for known EST				       #
-############################################################
-
-sub html_tab
-{
-  my ($rna,$est) = @_;
-  my $out = $html_repertory;
-  
-  `wget https://galaxy.gred-clermont.fr/clifinder/arrows.png -P $out && wget https://galaxy.gred-clermont.fr/clifinder/row_bkg.png -P $out && wget https://galaxy.gred-clermont.fr/clifinder/jquery.min.js -P $out`;
-  my $chimOut = $html;
-  
-  open(my $tab, ">".$chimOut) || die "cannot open $chimOut";
-  print_header($tab,"Chimerae");
-  print $tab "<tr>
-  <th>L1 chromosome</th>
-  <th>L1 start</th>
-  <th>L1 end</th>
-  <th>L1 strand</th>";
-  for my $i (0..$#fastq1)
-  {
-    print $tab "\t<th>$name[$i] read #</th>\n";
-  }
-  print $tab "
-  <th>Chimera chromosome</th>
-  <th>Chimera start</th>
-  <th>Chimera end</th>
-  <th>Chimera strand</th>";
-  for my $i (0..$#fastq1)
-  {
-    print $tab " <th>$name[$i] read #</th>\n";
-  }
-  print $tab "\t<th>Known RNA</th>
-  \t<th>Known EST</th>\n\t<th></th>\n</tr>";  
-  
-  for my $i (0..$#results)
-  {
-    print $tab "<tr>";
-    foreach my $j (@{$results[$i]})
-    {
-      print $tab " <td>$j</td>";
-    }
-    my ($Hrna, $Hest) = ('','');
-    $Hrna = ${$rna}{$i}[0]  if exists(${$rna}{$i});
-    $Hest = ${$est}{$i}[0] if exists(${$est}{$i});
-    my $Lrna ='link break'; my $Lest = 'link break';
-    chomp $Hrna; chomp $Hest;
-    $Lrna = $3 if $Hrna =~/gi\|(.*?)\|(.*?)\|(.*)\|$/;
-    $Lest = $3 if $Hest =~/gi\|(.*?)\|(.*?)\|(.*)\|$/;
-    print $tab "\t<td><A HREF=\"http://www.ncbi.nlm.nih.gov/nuccore/$Lrna\">$Hrna</A></td>\n";
-    print $tab "\t<td><A HREF=\"http://www.ncbi.nlm.nih.gov/nuccore/$Lest\">$Hest</A></td>\n";
-    print $tab "\t<td><div class=\"arrow\"></div></td>\n</tr>\n";
-    my $img = 'link break';
-    $img = $i.'.svg';
-    my $colspan = scalar(@fastq1) * 2 + 8 ;
-    print $tab "<tr>\n\t<td valign=top  colspan = $colspan><img src=\"$img\"/></td>\n\t<td valign=top>";
-    if (exists(${$rna}{$i}))
-    {
-      for (my $w = 1; $w <= $#{${$rna}{$i}}; $w++)
-      {
-        $Hrna = '';
-        $Hrna = ${$rna}{$i}[$w];
-        $Lrna ='link break';
-        chomp $Hrna;
-        $Lrna = $3 if $Hrna =~/gi\|(.*?)\|(.*?)\|(.*)\|$/;
-        print $tab "<A HREF=\"http://www.ncbi.nlm.nih.gov/nuccore/$Lrna\">$Hrna</A><br>\n";
-      }
-      delete ${$rna}{$i};
-    }
-    print $tab "</td>\n\t<td valign=top>";
-    if (exists (${$est}{$i}))
-    {
-      for (my $w = 1; $w <= $#{${$est}{$i}}; $w++)
-      {
-        $Hest = '';
-        $Hest = ${$est}{$i}[$w];
-        chomp $Hest;
-        $Lest ='link break';
-        $Lest = $3 if $Hest =~/gi\|(.*?)\|(.*?)\|(.*)\|$/;
-        print $tab "\t<A HREF=\"http://www.ncbi.nlm.nih.gov/nuccore/$Lest\">$Hest</A><br>\n";
-      }
-      delete ${$est}{$i};
-    }
-    print $tab "</td>\n\t<td></td>\n</tr>\n";
-  }
-  print $tab qw{
-    </table>
-  };
-  print $tab "<a href=\"report.txt\">Report</a>";
-  print $tab qw{
-    </body>
-    </html>
-  };
-  close $tab;
-}
-
-############################################################
-##Function save_csv: save results in different formats   ###
-############################################################
-## @param:												   #	
-############################################################
-sub save_csv{	
-	
-	my $out = $html_repertory;
-	my $Line_only=$html_repertory.'/'.'Line_only_hg19.txt.gz'; push(@garbage, $Line_only); #Line Only H19 database
-	my $Hg19_refseq=$html_repertory.'/'.'hg19_refseq.bed'; push(@garbage, $Hg19_refseq);#h19 refseq bed file
-	my $out1= $html_repertory.'/results.txt';
-	my $out2= $html_repertory.'/first_results.txt';
-	my $out3 =$html_repertory.'/final_result_chimerae.txt';
-	
-	#load databases needed
-	
-	`wget https://galaxy.gred-clermont.fr/clifinder/Line_only_hg19.txt.gz -P $out`;
-	`wget https://galaxy.gred-clermont.fr/clifinder/hg19_refseq.bed -P $out `;
-	
-	
-	# save result in csv file ##
-	
-    my $filed = $out1;
-	open(my $tab, ">".$filed) || die "cannot open $file";
-	print $tab "L1 chromosome \t L1 start \t L1 end \t L1 strand";;
-	for my $i (0..$#fastq1)
-  	{
-   		 print $tab "\t $name[$i] read #";
-  	}
-  	print $tab "\t Chimera chromosome\t Chimera start \t Chimera end \t Chimera strand";
-  	for my $i (0..$#fastq1)
-  	{
-   		 print $tab "\t $name[$i] read #";
-  	}	
-  	print $tab "\n";
-  	for my $i ( 0 .. $#results )
-  	{
-    	my $rowref = $results[$i];
-    	my $n = @$rowref - 1;
-    	for my $j ( 0 .. $n-1 ) 
-    	{
-        	print $tab "$results[$i][$j]\t";
-    	}
-    	print $tab "$results[$i][$n]\n";	
-    }
-	close $tab;
-	
-	##Add some information via R Scripts##
-	
-	use Statistics::R;
-	# Create bridge between Perl and R
-	my $R = Statistics::R->new();
-	$R->startR;
-	eval{
-		$R->send(
-		qq '
-		rm(list=ls())
-		library(GenomicRanges)
-		library(plyr)
-		chim<-read.delim("$out1")
-		
-		chim<-chim[order(chim[,$#fastq1+7],decreasing=F),]
-		chim<-chim[order(chim[,2],decreasing=F),]
-		chr<-sub("chr","",as.character(chim[,1]))
-		chim<-chim[order(as.numeric(chr)),]
-		
-		grchim <- GRanges(seqnames = chim[,1],
-		              IRanges(start = chim[,2],
-		                      end = chim[,3]),strand=chim[,4])
-		
-		
-		grchim\$ID<-paste("Id_",1:length(chim[,1]),sep="")
-		
-		mcols(grchim)<-cbind(mcols(grchim),chim[,5:($#fastq1+9)])
-		
-		
-		grfusR<- union(grchim,grchim)
-		
-		position<-as.data.frame(findOverlaps(grfusR,grchim))
-		
-		grfusR\$dup<- table(position[,1])
-		
-		position2<-as.data.frame(findOverlaps(grfusR[grfusR\$dup>1],grchim))
-		
-		
-		grfusR2<-grfusR
-		strand(grfusR2)<- "+"
-		gr3<-union(grfusR2,grfusR2)
-		position3<- as.data.frame(findOverlaps(gr3,grfusR2))
-		gr3\$dup<-table(position3[,1])
-		
-		position3<-as.data.frame(findOverlaps(gr3[gr3\$dup>1],grfusR2))
-		grfusR\$info<-"no"
-		grfusR\$info [position3[,2]]<-"overlap sens opposé"
-		
-		
-				
-		grfusR\$ID<-"Id"
-		grfusR\$ID[position[!duplicated(position[,1]),1]]<-grchim\$ID[position[!duplicated(position[,1]),2]]
-		
-		if(nrow(position2)!=0)
-		{
-			result <- aggregate(position2[,2] ~ position2[,1], data = position2, paste, collapse = "_")
-			grfusR\$ID[grfusR\$dup>1]<-paste("ID",result[,2],sep="_")
-		}
-		
-		mcols(grfusR)<-cbind(mcols(grfusR), mcols(grchim[position[!duplicated(position[,1]),2]]))
-		
-		
-		
-		min<-ddply(as.data.frame(grchim), .(seqnames,end,strand), function(x)x[x\$Chimera.start==min(x\$Chimera.start),])
-		min<-ddply(as.data.frame(min), .(seqnames,start,strand), function(x)x[x\$Chimera.start==min(x\$Chimera.start),])
-		max<-ddply(as.data.frame(grchim), .(seqnames,end,strand), function(x)x[x\$Chimera.end==max(x\$Chimera.end),])
-		max<-ddply(as.data.frame(max), .(seqnames,start,strand), function(x)x[x\$Chimera.end==max(x\$Chimera.end),])
-
-		grfusR<-as.data.frame(grfusR)
-		grfusR<-grfusR[order(grfusR[,1],grfusR[,2],grfusR[,3],grfusR[,4],decreasing=F),]
-
-		grfusR\$Chimera.start<- min\$Chimera.start
-		grfusR\$Chimera.end<-max\$Chimera.end
-
-	
-		datax<-as.data.frame(grfusR)
-		colnames(datax)[1:3]<-colnames(chim)[1:3]
-		colnames(datax)[5]<-colnames(chim)[4]
-		
-		
-		grchim2 <- GRanges(seqnames = datax[,$#fastq1+12],
-		              IRanges(start = datax[,$#fastq1+13],
-		                      end = datax[,$#fastq1+14]),strand=datax[,$#fastq1+15])
-		mcols(grchim2)<-datax[,-c(4,$#fastq1+12:$#fastq1+15)]
-		
-		
-		
-		grfus<- union(grchim2,grchim2)
-		
-		position<-as.data.frame(findOverlaps(grfus,grchim2))
-		
-		grfus\$dup<- table(position[,1])
-		
-		position2<-as.data.frame(findOverlaps(grfus[grfus\$dup>1],grchim2))
-		
-		grchim2[ position2[,2] ]
-		
-		
-		
-		
-		grfus\$ID_final<-"Id"
-		grfus\$ID_final[position[!duplicated(position[,1]),1]]<-grchim2\$ID[position[!duplicated(position[,1]),2]]
-		
-		if(nrow(position2)!=0)
-		{
-			result <- aggregate(position2[,2] ~ position2[,1], data = position2, paste, collapse = "_")
-			grfus\$ID_final[grfus\$dup>1]<-paste("Id",result[,2],sep="_")
-		}
-		
-		
-		
-		mcols(grfus)<-cbind(mcols(grfus), mcols(grchim2[position[!duplicated(position[,1]),2]]))
-		
-		 for (i in 0:$#fastq1)
-		 {
-		  mcols(grfus)[grfus\$dup>1,12+i] <- mcols(grfus)[grfus\$dup>1,12+i] +  mcols(grchim2)[position[duplicated(position[,1]),2],10+i]
-		 }
-		
-		
-		grfus2<-grfus
-		strand(grfus2)<-"+"
-		gr3<-union(grfus2,grfus2)
-		
-		position3<- as.data.frame(findOverlaps(gr3,grfus2))
-		gr3\$dup<-table(position3[,1])
-		
-		position3<-as.data.frame(findOverlaps(gr3[gr3\$dup>1],grfus2))
-		
-		grfus\$info [position3[,2]]<-"overlap sens opposé"
-
-		min<-ddply(as.data.frame(grchim2), .(seqnames,end,strand), function(x)x[x\$L1.start==min(x\$L1.start),])
-		min<-ddply(data.frame(min), .(seqnames,start,strand), function(x)x[x\$L1.start==min(x\$L1.start),])
-		max<-ddply(as.data.frame(grchim2), .(seqnames,end,strand), function(x)x[x\$L1.end==max(x\$L1.end),])
-		max<-ddply(data.frame(max), .(seqnames,start,strand), function(x)x[x\$L1.end==max(x\$L1.end),])
-		
-		grfus1<-as.data.frame(grfus)
-		grfus1<-grfus1[order(grfus1[,1],grfus1[,2],grfus1[,3],grfus1[,4],decreasing=F),]
-		
-		grfus1\$L1.start<- min\$L1.start
-		grfus1\$L1.end<-max\$L1.end
-		
-		dataf<-as.data.frame(grfus1)		
-		
-		result<-( data.frame("Chimera.Chr"= dataf\$L1.chromosome, "Chimera.Start"=apply(data.frame( dataf\$start,dataf\$end,dataf\$L1.start,dataf\$L1.end  ),1,min) , "Chimera.End"= apply(data.frame( dataf\$start,dataf\$end,dataf\$L1.start,dataf\$L1.end  ),1,max) ,"Chimera.Strand"=dataf\$L1.strand ,"L1.Chr"= dataf\$L1.chromosome, "L1.Start"=dataf\$L1.start ,"L1.End"= dataf\$L1.end , "L1.Strand"=dataf\$L1.strand , "Unique.Chr"= dataf\$seqnames, "Unique.Start"=dataf\$start , "Unique.End"= dataf\$end , "Unique.Strand"=dataf\$strand , "ID_final"=dataf\$ID_final,"info"=dataf\$info, dataf[,18:($#fastq1+18)]   )  )
-		
-		result<-result[order(result[,2],decreasing=F),]
-		chr<-sub("chr","",as.character(result[,1]))
-		result<-result[order(as.numeric(chr)),]
-		options(scipen=10) 
-		write.table(result,"$out2",sep="\t",row.names = F,quote = F) 
-	    grchim <- GRanges(seqnames = result\$L1.Chr,
-	              IRanges(start = result\$L1.Start,
-	              		  end = result\$L1.End),strand=result\$L1.Strand)
-	    mcols(grchim)<-result
-	    
-		Rep<-read.delim("$Line_only",skip=1)
-		
-		Gene<-read.delim("$Hg19_refseq") 
-	    grLINE <- GRanges(seqnames = Rep\$genoName,
-	              IRanges(start = Rep\$genoStart,
-	                      end = Rep\$genoEnd),
-	              repStrand=as.character(Rep\$strand),
-	                     repName =as.character(Rep\$repName))
-	   
-	    grGene <- GRanges(seqnames = Gene\$chrom,
-	                      IRanges(start = Gene\$txStart,
-	                              end = Gene\$txEnd),
-	                      geneStrand=as.character(Gene\$strand),
-	                              geneName = as.character(Gene\$name2))
-	                              
-		position<-as.data.frame(findOverlaps(grchim,grLINE))
-	
-		position2<-as.data.frame(findOverlaps(grchim,grGene))
-	
-		table(grLINE\$repName[position[,2]])
-		write.table(table(grLINE\$repName[position[,2]]))
-		
-		grchim\$GeneName<-"no_gene"
-	
-		grchim\$GeneName[position2[,1]]<- grGene\$geneName[position2[,2]]
-		
-		grchim\$GeneStrand<-"*"
-		
-		grchim\$GeneStrand[position2[,1]]<- grLINE\$geneStrand[position2[,2]]
-		
-		grchim\$repName<-"no"
-		
-		grchim\$repName[position[,1]]<- grLINE\$repName[position[,2]]
-		
-		grchim\$repStart<-0
-	
-		grchim\$repStart[position[,1]]<-start(grLINE[position[,2]])
-		
-		grchim\$repEnd<-0
-		
-		grchim\$repEnd[position[,1]]<-end(grLINE[position[,2]])
-		
-		grchim\$repWidth<-0
-		
-		grchim\$repWidth[position[,1]]<-width(grLINE[position[,2]])
-		
-		grchim\$repStrand<-"*"
-		
-		grchim\$repStrand[position[,1]]<- grLINE\$repStrand[position[,2]]
-		
-		dup<-position[duplicated(position[,1]),1]
-		if(length(dup != 0))
-		{
-			for (i in 1:length(dup))
-			{
-			  
-				grchim\$repName[dup[i]] <-paste(grLINE\$repName[position[position[,1]==dup[i],2]],collapse="/")
-				grchim\$repStart[dup[i]] <-paste(start(grLINE[position[position[,1]==dup[i],2]]),collapse="/")
-				grchim\$repEnd[dup[i]] <-paste(end(grLINE[position[position[,1]==dup[i],2]]),collapse="/")
-				grchim\$repWidth[dup[i]] <-paste(width(grLINE[position[position[,1]==dup[i],2]]),collapse="/")
-				grchim\$repStrand[dup[i]] <-paste(grLINE\$repStrand[position[position[,1]==dup[i],2]],collapse="/")	
-				
-			}
-		}
-		
-		final_result<-as.data.frame(grchim)
-		options(scipen=10)
-		write.table(final_result[,-c(1:5)],"$out3",sep="\t",row.names = F,quote = F)
-		'
-		);
-		};
-	
-		$R->stop();
-		unlink @garbage;
-		
-		
-		
-			
-}	
-
-
--- a/LINE_html_4_1.xml	Wed Jan 31 09:59:07 2018 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-<tool name="chimericLineFinder4" id="LINE mosaic transcripts finder4" version="0.4.1">
-  <description>Find chimerics transcripts containing LINEs sequences</description>
-  <command interpreter="perl">
-   
-   LINE_html4.1.pl
-  
-    --first ${first}
-    --name ${first.name}
-    --second ${second}
-    
-
-    #if $Genome.refGenomeSource == "history":
-    --ref "${Genome.ownFile}"
-    --build_index
-    #else:
-    --ref "${Genome.indices.fields.path}"
-    #end if
-   
-    #if $TE.refGenomeSource == "history":
-    --TE "${TE.ownFile}"
-    --build_TE
-    #else:
-    --TE "${TE.indices.fields.path}"
-    #end if
-
-
-    #for $input_file in $input_files:
-      --first ${input_file.first}
-      --name ${input_file.first.name}
-      --second ${input_file.second}
-    #end for
-    --html $chimerae
-    --html_path ${chimerae.files_path}
-    --size_insert $size_insert
-    --size_read $size
-    --pourcentage $prct
-    --image $image
-    --BDir $BDir
-    --minL1 $minL1
-    --mis_L1 $mis_L1
-    
-  
-  </command>
-  
-   <requirements>
-        <requirement type="package" version="3.1.0">R</requirement>
-        <requirement type="package" version="0.7.12">bwa</requirement>
-        <requirement type="package" version="2.17.0">bedTools</requirement>
-    </requirements>
-  
-  <inputs>
-    <param format="fastqsanger" name="first" type="data" label="first set of paired-end reads" help=""/>
-    <param format="fastqsanger" name="second" type="data" label="second set of paired-end reads" help=""/>
-    <repeat name="input_files" title="Additional Fastq Files">
-      <param name="first" type="data" format="fastqsanger" label="FASTQ file" help="first set of paired-end reads" />
-      <param name="second" type="data" format="fastqsanger" label="FASTQ file" help="second set of paired-end reads" />
-    </repeat>
-
-  <conditional name="Genome">
-    <param name="refGenomeSource" type="select" label="Will you select a reference genome from your history or use a built-in index?">
-      <option value="indexed">Use a built-in index</option>
-      <option value="history">Use one from the history</option>
-    </param>
-    <when value="indexed">
-      <param name="indices" type="select" label="Select a reference genome">
-        <options from_data_table="bwa_indexes">
-          <filter type="sort_by" column="2" />
-          <validator type="no_options" message="No indexes are available" />
-        </options>
-      </param>
-    </when>
-    <when value="history">
-      <param name="ownFile" type="data" format="fasta" metadata_name="dbkey" label="Select a reference from history" />
-    </when>
-  </conditional>
-
-
-  <conditional name="TE">
-    <param name="refGenomeSource" type="select" label="Will you select TE database from your history or use a built-in index?">
-      <option value="indexed">Use a built-in index</option>
-      <option value="history">Use one from the history</option>
-    </param>
-    <when value="indexed">
-      <param name="indices" type="select" label="Select a TE reference">
-        <options from_data_table="bwa_indexes">
-          <filter type="sort_by" column="2" />
-          <validator type="no_options" message="No indexes are available" />
-        </options>
-      </param>
-    </when>
-    <when value="history">
-      <param name="ownFile" type="data" format="fasta" metadata_name="dbkey" label="Select a reference from history" />
-    </when>
-  </conditional>
-
-    <param name="BDir" type="select" >
-        <option value="0">Undirectional libraries</option>
-        <option value="1">TEs sequences in first read in pair</option>
-        <option value="2">TEs sequences in second read in pair</option>
-    </param>
-
-    <param name="size" type="integer" value="100" label="reads size"/>
-    <param name="size_insert" type="integer" value="250" label="maximum insert size (bp)"/>
-    <param name ="minL1" type="integer" value="50" label="minimun bp mapping on selected TEs database"/>
-    <param name ="mis_L1" type="integer" value="2" label="number of mismatches tolerated in TEs mapping sequences"/>
-    <param name="prct" type="integer" value="33" label="minimum consecutive bp corresponding to a unique sequence"/>
-  </inputs>
-  <outputs>
-    <data format="html" name="chimerae" label="${tool.name}_on_${on_string}"/>
-  </outputs>
-</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README.rst	Tue Feb 11 09:28:56 2020 -0500
@@ -0,0 +1,69 @@
+.. image:: https://travis-ci.org/GReD-Clermont/CLIFinder.svg?branch=master
+    :target: https://travis-ci.org/GReD-Clermont/CLIFinder
+
+CLIFinder v0.5.0
+================
+
+
+Description
+-----------
+
+L1 Chimeric Transcripts (LCTs)  are transcribed from LINE 1 antisense promoter and include the L1 5’UTR sequence in antisense orientation followed by the adjacent genomic region.  
+CLIFinder v0.4.1 is a Galaxy tool, specifically designed to identify  potential LCTs from one or several oriented RNA-seq paired-end reads in the human genome.  
+CLIFinder v0.4.1 is customizable to detect transcripts initiated by different types of repeat elements.
+
+
+
+Installation
+------------
+
+Some tools are used by CLIFinder that must be installed and added to the PATH (listed in CLIFinder.xml). This is easily done through conda with the command:
+::
+
+    conda create -n clifinder samtools=1.9 bedtools=2.26.0gx repeatmasker=4.0.9_p2 bwa=0.7.17 fastx_toolkit=0.0.14 perl=5.26.2 perl-getopt-long=2.50 perl-file-copy-recursive=0.45 perl-parallel-forkmanager=2.02 perl-statistics-r=0.34 r-base=3.5.1 r-plyr=1.8.5 bioconductor-genomicranges=1.34.0 wget=1.20.1
+
+You should then be able to use CLIFinder by activating the conda environment and running the script with:
+::
+
+    conda activate clifinder
+    perl script/CLIFinder.pl
+
+Galaxy uses conda to solve tool requirements starting with Galaxy release 16.01 so that is the minimum version required to install this tool (which can be done through the toolshed: https://toolshed.g2.bx.psu.edu/repository?repository_id=5c73d1cf20ab37c3).
+
+
+
+Usage
+-----
+
+The command you need to use to run the script is as follows:
+::
+
+    CLIFinder.pl --first <first fastq of paired-end set 1> --name <name 1> --second <second fastq of paired-end set 1> [--first <first fastq of paired-end set 2> --name <name 2> --second <second fastq of paired-end set 2> ...] --ref <reference genome> [--build_ref] --TE <transposable elements> [--build_TE] --html <results.html> --html-path <results directory> [options]
+
+
+    Arguments:
+        --first <fastq file>    First fastq file to process from paired-end set
+        --name <name>           Name of the content to process
+        --second <fastq file>   Second fastq file to process from paired-end set
+        --ref <reference>       Fasta file containing the reference genome
+        --TE <TE>               Fasta file containing the transposable elements
+        --rmsk <text file>      Tab-delimited text file (with headers) containing reference repeat sequences (e.g. rmsk track from UCSC)
+        --refseq <text file>    Tab-delimited file (with headers) containing reference genes (e.g. RefGene.txt from UCSC)
+        --html                  Main HTML file where results will be displayed
+        --html-path             Folder where results will be stored
+
+    For any fasta file, if a bwa index is not provided, you should build it through the corresponding '--build_[element]' argument
+
+    Options:
+        --rnadb <RNA db>        Blast database containing RNA sequences (default: empty)
+        --estdb <EST db>        Blast database containing EST sequences (default: empty)
+        --size_read <INT>       Size of reads (default: 100)
+        --BDir <0|1|2>          Orientation of reads (0: undirectional libraries, 1: TEs sequences in first read in pair, 2: TEs sequences in second read in pair) (default: 0)
+        --size_insert <INT>     Maximum size of insert tolerated between R1 and R2 for alignment on the reference genome (default: 250)
+        --min_L1 <INT>          Minimum number of bp matching for L1 mapping (default: 50)
+        --mis_L1 <INT>          Maximum number of mismatches tolerated for L1 mapping (default: 2)
+        --min_unique <INT>      Minimum number of consecutive bp not annotated by RepeatMasker (default: 33)
+        --threads <INT>         Number of threads (default: 1)
+
+    For Blast database files, if a fasta is provided, the database can be built with '--build_[db]'. Otherwise, provide a path or URL. "tar(.gz)" files are acceptable, as well as wild card (rna*) URLs.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/CLIFinder.pl	Tue Feb 11 09:28:56 2020 -0500
@@ -0,0 +1,1100 @@
+#!/usr/bin/env perl
+
+################################################
+#Declaration of necessary libraries#############
+################################################
+
+use strict;
+use warnings;
+use Parallel::ForkManager;
+use POSIX;
+use Statistics::R;
+use Getopt::Long qw(HelpMessage VersionMessage);
+use File::Basename;
+use File::Copy::Recursive;
+use FindBin qw($Bin);
+use Archive::Tar;
+
+our $VERSION = '0.5.0';
+
+
+#####################################################################
+#Definition options of execution according to the previous variables#
+#####################################################################
+
+GetOptions(
+  "first|1=s"     => \my @fastq1,
+  "second|2=s"    => \my @fastq2,
+  "name=s"        => \my @name,
+  "html=s"        => \my $html,
+  "html_path=s"   => \my $html_repertory,
+  "TE=s"          => \my $TE,
+  "ref=s"         => \my $ref,
+  "rnadb:s"       => \my $rna_source,
+  "estdb:s"       => \my $est_source,
+  "build_TE"      => \my $build_TE,
+  "build_ref"     => \my $build_ref,
+  "build_rnadb"   => \my $build_rnadb,
+  "build_estdb"   => \my $build_estdb,
+  "rmsk=s"        => \my $rmsk_source,
+  "refseq=s"      => \my $refseq,
+  "min_unique:i"  => \(my $prct = 33),
+  "size_insert:i" => \(my $maxInsertSize = 250),
+  "size_read:i"   => \(my $size_reads = 100),
+  "BDir:i"        => \(my $Bdir = 0),
+  "min_L1:i"      => \(my $min_L1 = 50),
+  "mis_L1:i"      => \(my $mis_L1 = 2),
+  "threads:i"     => \(my $threads = 1),
+  'help'          => sub { HelpMessage(0); },
+  'version'       => sub { VersionMessage(0); },
+) or HelpMessage(1);
+
+HelpMessage(1) unless @fastq1 && @fastq2 && @name && defined($TE) && defined($ref) && defined($rmsk_source) && defined($refseq) && defined($html) && defined($html_repertory);
+
+my $iprct = 100 - (($prct / $size_reads)*100) ;
+my $mis_auth = $size_reads - $min_L1 + $mis_L1 ;
+my $eprct = ($iprct * $size_reads) /100;
+my $dprct = ((100-$iprct) * $size_reads) / 100;
+
+################################################
+#Construct index of ref and TE if doesn't exist#
+################################################
+
+`(bwa index $ref)` if ($build_ref);
+`(bwa index $TE)` if ($build_TE);
+
+############################################
+#Create repository to store resulting files#
+############################################
+
+mkdir $html_repertory;
+
+##########################################
+#Define hash                             #
+##########################################
+
+my %frag_exp_id;
+
+##########################
+#Data file we have to use#
+##########################
+
+print STDOUT "Extracting data from rmsk file\n";
+my $line_only=$html_repertory.'/'.'line_only.txt';
+my $rmsk = $html_repertory.'/rmsk.bed'; 
+filter_convert_rmsk($rmsk_source, $rmsk, $line_only);
+
+##############################
+# Analyse of each fastq file #
+##############################
+
+my @garbage; my $num = 0;
+foreach my $tabR (0..$#fastq1)
+{
+  ###################################################
+  # Paired end mapping against L1 promoter sequences#
+  ###################################################
+  
+  print STDOUT "Alignement of $name[$tabR] to L1\n";
+  my $sam = $html_repertory.'/'.$name[$tabR]."_L1.sam"; push(@garbage, $sam);
+  align_paired( $TE, $fastq1[$tabR], $fastq2[$tabR], $sam, $threads, $mis_auth);
+  print STDOUT "Alignement done\n";
+  
+  ##################################################
+  # Creation of two fastq for paired halfed mapped:#
+  # - _1 correspond to sequences mapped to L1      #
+  # - _2 correspond to sequences unmapped to L1    #
+  ##################################################
+  
+  print STDOUT "Getting pairs with one mate matched to L1 and the other mate undetected by repeatmasker as a repeat sequence\n";
+  
+  my $out_ASP_1 = $html_repertory.'/'.$name[$tabR]."_1.fastq"; push(@garbage, $out_ASP_1);
+  my $out_ASP_2 = $html_repertory.'/'.$name[$tabR]."_2.fastq"; push(@garbage, $out_ASP_2);
+  
+  ##split mate that matched to L1 and others##
+  my ($ASP_readsHashR, $half_num_out) = get_half($sam, $mis_L1, $min_L1, $Bdir);
+  # $ASP_reads{$line[0]}[0] mapped - $ASP_reads{$line[0]}[1] unmapped
+  
+  ##pairs obtained after repeatmasker on the other mate##
+  my $left = sort_out($threads, $out_ASP_1, $out_ASP_2, $dprct, $eprct, $ASP_readsHashR, $html_repertory);
+
+  print STDOUT "Number of half mapped pairs : $half_num_out\n";
+  print STDOUT "Number of pairs after repeatmasker: $left\n";
+  
+  ##################################################
+  # Alignment of halfed mapped pairs on genome     #
+  ##################################################
+  print STDOUT "Alignment of potential chimeric sequences to the genome\n";
+  $sam = $html_repertory.'/'.$name[$tabR]."_genome.sam";
+  push(@garbage, $sam);
+  align_genome($ref, $out_ASP_1, $out_ASP_2, $sam, $maxInsertSize, $threads);
+  print STDOUT "Alignment done\n";
+  
+  ##compute the number of sequences obtained after alignment ##
+  
+  $left = `samtools view -@ $threads -Shc $sam`;
+  chomp $left; $left = $left/2;
+  print STDOUT "Number of sequences: $left\n";
+
+  ##################################################
+  # Create bedfiles of potential chimerae          #
+  # and Know repeat sequences removed              #
+  ##################################################
+  
+  print STDOUT "Looking for chimerae\n";
+  results($html_repertory, $sam, $name[$tabR], $iprct, \%frag_exp_id, $rmsk, $num, \@garbage);
+  $num++;
+}
+
+##define files variables ##
+
+my $repfirst = $html_repertory.'/first.bed'; push(@garbage,$repfirst);
+my $repsecond = $html_repertory.'/second.bed'; push(@garbage,$repsecond);
+my $repMfirst = $html_repertory.'/firstM.bed'; push(@garbage,$repMfirst);
+my $repMsecond = $html_repertory.'/secondM.bed'; push(@garbage,$repMsecond);
+#my $covRepMsecond = $html_repertory.'/covSecondM.bed'; push(@garbage,$covRepMsecond);
+
+##Concate all files for first and second mate results ##
+
+`cat $html_repertory/*-first.bed > $repfirst`; #*/
+`cat $html_repertory/*-second.bed > $repsecond`; #*/
+
+## Sort Files and generate files that merge reads in the same locus ##
+print STDOUT "Sort files and merge reads in the same locus\n";
+`bedtools sort -i $repfirst | bedtools merge -c 4,5 -o collapse,max -d 100 -s > $repMfirst `;
+`bedtools sort -i $repsecond | bedtools merge -c 4,5 -o collapse,max -d 100 -s > $repMsecond `;
+
+my (%frag_uni, @second_R, @second_exp, @results);
+my $merge_target = $html_repertory.'/target_merged.bed'; push(@garbage, $merge_target);
+my $merge = $html_repertory.'/merged.bed'; push(@garbage, $merge);
+
+open (my $mT, ">".$merge_target) || die "cannot open $merge_target\n";
+open (my $m, ">".$merge) || die "cannot open $merge\n";
+open (my $in, $repMsecond) || die "cannot open secondM\n";
+my $cmp = 0;
+while (<$in>)
+{
+  chomp $_;
+  my @tmp = (0) x scalar(@fastq1);
+  my @line = split /\t/, $_;
+  my @names =split /,/, $line[4];
+  foreach my $n (@names){$n =~/(.*?)\/[12]/; $frag_uni{$1} = $cmp; $tmp[$frag_exp_id{$1}]++; }
+  $second_exp[$cmp] = \@tmp;
+  $cmp++;
+  push @second_R, [$line[0],$line[1],$line[2],$line[3]];
+}
+
+$cmp = 0;
+open ($in, $repMfirst) || die "cannot open firstM\n";
+while (<$in>)
+{
+  chomp $_;
+  my %sec;
+  my @line = split /\t/, $_;
+  my @names =split /,/, $line[4];
+  my @tmp = (0) x scalar(@fastq1);
+  foreach my $n (@names){$n =~/(.*?)\/[12]/; $tmp[$frag_exp_id{$1}]++; }
+  foreach my $n (@names)
+  {
+    $n =~/(.*?)\/[12]/;
+    unless (exists ($sec{$frag_uni{$1}}) )
+    {
+      my @lmp = ($line[0], $line[1], $line[2], $line[3]);
+      foreach my $exp_N (@tmp){ push @lmp, $exp_N;}
+      push (@lmp, $second_R[$frag_uni{$1}]->[0], $second_R[$frag_uni{$1}]->[1], $second_R[$frag_uni{$1}]->[2], $second_R[$frag_uni{$1}]->[3]);
+      foreach my $exp_N (@{$second_exp[$frag_uni{$1}]}){ push @lmp, $exp_N;}
+      
+      my $name = $cmp.'-'.$second_R[$frag_uni{$1}]->[0].'-'.$second_R[$frag_uni{$1}]->[1].'-'.$second_R[$frag_uni{$1}]->[2];
+      print $mT $second_R[$frag_uni{$1}]->[0]."\t".$second_R[$frag_uni{$1}]->[1]."\t".$second_R[$frag_uni{$1}]->[2]."\t$name\t29\t".$second_R[$frag_uni{$1}]->[3]."\n";
+      
+      my ($b, $e) = (0,0);
+      if ($line[1] < $second_R[$frag_uni{$1}]->[1])
+      {
+        $b = $line[1] - 1000; $e = $second_R[$frag_uni{$1}]->[2] + 1000;
+        $name = $cmp.'-'.$line[0].'-'.$b.'-'.$e;
+        print $m $line[0]."\t".$b."\t".$e."\t$name\t29\t".$second_R[$frag_uni{$1}]->[3]."\n";
+      }
+      else
+      {
+        $b = $second_R[$frag_uni{$1}]->[1] - 1000; $e = $line[2] + 1000;
+        $name = $cmp.'-'.$line[0].'-'.$b.'-'.$e;
+        print $m $line[0]."\t".$b."\t".$e."\t$name\t29\t".$second_R[$frag_uni{$1}]->[3]."\n";
+      }
+      $results[$cmp] = \@lmp;
+      $cmp++;
+    }
+    $sec{$frag_uni{$1}} = undef;
+  }
+}
+close $mT; close $m;
+
+my $fasta = $html_repertory.'/target_merged.fasta'; push(@garbage, $fasta);
+my $extend = $html_repertory.'/extend.fasta'; push(@garbage, $extend);
+
+`bedtools getfasta -name -fi $ref -bed $merge -fo $extend`;
+`bedtools getfasta -name -fi $ref -bed $merge_target -fo $fasta`;
+
+################################################
+#Blast against human rna and est, if provided  #
+################################################
+
+my $rna;
+my $est;
+if(defined($rna_source))
+{
+  ##get databases for est and rna
+  print STDOUT "Getting blast databases for rna\n";
+  my $rna_db = get_blastdb_from_source($rna_source, $build_rnadb, 'rna', $html_repertory);
+
+  print STDOUT "Blast against human rna\n";
+  my $tabular = $html_repertory."/chimerae_rna.tab"; push(@garbage, $tabular);
+  blast($rna_db, $fasta, $tabular, $threads);
+  $rna = extract_blast($tabular);
+
+  # Clean RNA blast database if in html dir
+  if(rindex($rna_db, $html_repertory, 0) == 0)
+  {
+    my $toErase = $rna_db.'.*';
+    unlink glob "$toErase";
+  }
+}
+if(defined($est_source))
+{
+  print STDOUT "Getting blast databases for est\n";
+  my $est_db = get_blastdb_from_source($est_source, $build_estdb, 'est', $html_repertory);
+
+  print STDOUT "Blast against human est\n";
+  my $tabular2 = $html_repertory."/chimerae_est.tab"; push(@garbage, $tabular2);
+  blast($est_db, $fasta, $tabular2, $threads);
+  $est = extract_blast($tabular2);
+
+  # Clean EST blast database if in html dir
+  if(rindex($est_db, $html_repertory, 0) == 0)
+  {
+    my $toErase = $est_db.'.*';
+    unlink glob "$toErase";
+  }
+}
+
+################################################
+#Create Results html file                      #
+################################################
+print STDOUT "Save results in file\n";
+save_csv(\@fastq1, \@name, \@results, $line_only, $refseq, $html_repertory);
+
+print STDOUT "Create HTML\n";
+html_tab(\@fastq1, \@name, \@results, $rna, $est, $html, $html_repertory);
+
+$extend = $extend.'*';
+push(@garbage, glob($extend));
+push(@garbage, $line_only);
+push(@garbage, $rmsk);
+unlink @garbage;
+
+print STDOUT "Job done!\n";
+  
+########################################### END MAIN ##########################################################
+
+
+##############################################################################################################
+############################################     FUNCTIONS   #################################################
+##############################################################################################################
+
+
+############################################################
+## Function to convert rmsk table to bed and line_only #####
+############################################################
+## @param:                                                 #
+##       $source: rmsk table file                          #
+##       $bed: rmsk bed file                               #
+##       $line_only: rmsk table file with only LINE        #
+############################################################
+
+sub filter_convert_rmsk
+{
+  my ($source, $bed, $line_only) = @_;
+  open(my $input, $source) || die "cannot open rmsk file! $!\n"; ## Open source file
+  open(my $bedfile, ">".$bed) || die "cannot open output bed file for rmsk! $!\n"; ## Open bed file
+  open(my $linefile, ">".$line_only) || die "cannot open output LINE-only file for rmsk! $!\n"; ## Open line_only file
+  my @headers;
+  my %indices;
+
+  print $linefile "#filter: rmsk.repClass = 'LINE'\n";
+
+  while(<$input>)
+  {
+    chomp $_;
+    if($. == 1)
+    {
+      if(substr($_, 0, 1) ne "#")
+      {
+        die "rmsk file does not have header starting with #\n";
+      }
+      else
+      {
+        print $linefile "$_\n";
+        my $firstline = substr($_, 1);
+        @headers = split(/\t/, $firstline);
+        @indices{@headers} = 0..$#headers;
+      }
+    }
+    else
+    {
+      my @line = split(/\t/,$_);
+      if($line[$indices{"repClass"}] eq "LINE")
+      {
+        print $linefile "$_\n";
+      }
+      print $bedfile "$line[$indices{'genoName'}]\t$line[$indices{'genoStart'}]\t$line[$indices{'genoEnd'}]\t$line[$indices{'repName'}]\t$line[$indices{'swScore'}]\t$line[$indices{'strand'}]\n";
+    }
+  }
+  close $input;
+  close $bedfile;
+  close $linefile;
+}
+
+
+############################################################
+## Function to get blast db from the specified source ######
+############################################################
+## @param:                                                 #
+##       $source: db source (URL or path)                  #
+##       $build_db: whether the db should be created       #
+##       $name: name of the db that could be created       #
+##       $dest_dir: where the data can be placed           #
+## @return:                                                #
+##       $path: blast db path                              #
+############################################################
+
+sub get_blastdb_from_source
+{
+  my ($source, $build_db, $name, $dest_dir) = @_;
+  # Assume source is just db path
+  my $path = $source;
+  my ($file) = $path =~ m~([^/\\]*)$~;
+  my $dbname = $file;
+  my @garbage;
+
+  if($build_db)
+  {
+    $dbname = $name;
+    $path = $dest_dir.'/'.$name;
+    print STDOUT "Making $dbname blast database\n";
+    `makeblastdb -in $source -dbtype nucl -out $path`;
+  }
+  else
+  {
+    # Check if source is URL
+    if(index($source, ":/") != -1)
+    {
+      my $url = $source;
+      if($file =~ /\*/)
+      {
+        $url =~ s/\Q$file//;
+        print STDOUT "Downloading blast database from $url\n";
+        `wget -q -N -r -nH -nd -np --accept=$file $url -P $dest_dir`;
+
+        # Assume regexp matches db name
+        $dbname =~ s/\*$//;
+      }
+      else
+      {
+        print STDOUT "Downloading blast database from $url\n";
+        `wget -q -N $source -P $dest_dir`;
+        push(@garbage, $dest_dir.'/'.$file);
+      }
+      if($? == 0)
+      {
+        print "Downloaded database\n";
+      }
+      else
+      {
+        print "Error while downloading database\n";
+      }
+      $path = $dest_dir.'/'.$dbname;
+    }
+    if(index($file, ".") != -1)
+    {
+      if(index($file, ".tar") != -1)
+      {
+        ## Extract tar files
+        print STDOUT "Extracting blast database from $file\n";
+        my @properties = ('name');
+        my $tar=Archive::Tar->new();
+        $tar->setcwd($dest_dir);
+        $tar->read($path);
+        my @files = $tar->list_files(\@properties);
+        $tar->extract();
+        $tar->clear();
+        unlink @garbage;
+
+        ## Get dbname from filenames
+        my @parts = split(/\./, $files[0]);
+        $dbname = $parts[0];
+        $path = $dest_dir.'/'.$dbname;
+        print STDOUT "Extracted database\n";
+      }
+      else
+      {
+        print STDOUT "Unexpected file format for database"
+      }
+    }
+  }
+  print "Using $dbname database\n";
+  return $path;
+}
+
+############################################################
+##Function that aligned paired-end reads on a genome########
+############################################################
+## @param:                                                 #
+##       $index: referential genome                        #
+##       $fasq1: first paired end file                     #
+##       $fasq2: second paired end file                    #
+##       $sam: alignment output file                       #
+##       $maxInsertSize: maximum size of insert            #
+##       $threads: number of threads used                  #
+############################################################
+
+sub align_genome
+{
+  my ($index, $fastq1, $fastq2, $sam, $maxInsertSize, $threads) = @_ ;
+  my @L_garbage =();
+  my $sai1 = $sam."_temporary.sai1"; push @L_garbage,$sai1;
+  my $sai2 = $sam."_temporary.sai2"; push @L_garbage,$sai2;
+  `bwa aln -o4 -e1000 -t $threads $index $fastq1 > $sai1`;
+  `bwa aln -o4 -e1000 -t $threads $index $fastq2 > $sai2`;
+  ## -A force the insertion size
+  `bwa sampe -s -A -a $maxInsertSize $index $sai1 $sai2 $fastq1 $fastq2 | samtools view -@ $threads -F4 -f 2 -Sh /dev/stdin -o $sam`;
+  unlink @L_garbage;
+}
+
+
+############################################################
+##Function get_half get alignement on TE                 ###
+############################################################
+## @param:                                                 #
+##       $sam: name of alignement file                     #
+##       $mis_L1: maximum number of mismatches             #
+##       $min_L1: minimum number of bp matching            #
+##       $Bdir: reads orientation                          #
+##                                                         #
+## @return:                                                #
+##       $ASP_readsHashR: table to store sequences         #
+##       $half_num_out: number of alignment saved          #
+############################################################
+
+sub get_half
+{
+  ## store name of file
+  my $sam = shift;
+  my $mis_L1 = shift;
+  my $min_L1 = shift;
+  my $Bdir = shift;
+  open(my $fic, $sam) || die "cannot open sam file! $!\n"; ## Open file
+  my (%ASP_reads); my $cmp = 0; ## Declare variables for
+  my $sequence = '';
+  my $score = '';
+  
+  ##read file##
+  while(<$fic>)
+  {
+    chomp $_;
+    ##We don't consider lines of sam files that are in header##
+    next if ($_ =~ /^\@[A-Za-z][A-Za-z](\t[A-Za-z][A-Za-z0-9]:[ -~]+)+$/ || $_ =~ /^\@CO\t.*/ );
+    ##We split line in several part##
+    my @line = split (/\t/,$_);
+   
+    ##Find if alignemets have min_L1 consecutives bases mapped on R1 ##
+    if ($_ =~/NM:i:(\d+)\t.*MD:Z:(.*)/)
+    {
+       my $misT = $1; my $MD = $2; my $maxT = 0;
+       $MD = $1 if ($MD =~ /(.*)\t/);
+       $MD =~ s/\^//g;
+       my @tab = split /[ATCG]/,$MD;
+       my $tot = 0;
+       my $accept = 0;
+       if ($misT <= $mis_L1){$accept = 1;}
+       else
+       {
+         if ( $mis_L1 > scalar(@tab) ) { $maxT = scalar(@tab); }
+         else{ $maxT = $mis_L1; }
+         for (my $t = 0; $t < $maxT ; $t++)
+         {
+           $tot += $tab[$t] if $tab[$t] ne '';
+         }
+         $accept = 1 if $tot >= $min_L1;
+       }
+       ## if sequence is not accepted we go to the next sequence ##
+       next if $accept == 0;
+    }
+    
+    ##looking for flag of the alignment and keep only good reads##
+    ##Find if it aligns on R1 or on R2##
+    
+    if ($line[1] == 73 || $line[1] == 89 || $line[1] == 117 || $line[1] == 69 || $line[1] == 133 || $line[1] == 181 || $line[1] == 153|| $line[1] == 137)
+    {
+      if ( $Bdir == 0
+              || ($Bdir == 1 && (($line[1] & 064 && $line[1] & 8) || ($line[1] & 128 && $line[1] & 4)))
+              || ($Bdir == 2 && (($line[1] & 128 && $line[1] & 8) || ($line[1] & 064 && $line[1] & 4))) )
+      {
+        $cmp++;
+        $sequence = $line[9];
+        $score = $line[10];
+        ## if sequence is reversed aligned then reverse complement sequence and reverse score ##
+        if ($line[1] & 16)
+        {
+          $sequence = reverse($sequence);
+          $score = reverse($score);
+          $sequence =~ tr/atgcuATGCU/tacgaTACGA/;
+        }
+        ## define table contains ##
+        $ASP_reads{$line[0]} = [undef,undef] unless exists( $ASP_reads{$line[0]} );
+        
+        ##split if first mate (R1) is mapped on L1 or not (R2) ##
+        if ($line[1] & 8)
+        {
+          $ASP_reads{$line[0]}[0] = "\@".$line[0]."\n".$sequence."\n+\n".$score."\n";
+        }
+        else
+        {
+          $ASP_reads{$line[0]}[1] = "\@".$line[0]."\n".$sequence."\n+\n".$score."\n";
+        }
+      }
+    }
+  }
+  close $fic;
+  return ( \%ASP_reads, $cmp);
+}
+
+############################################################
+##Function sort_out: extract paired end reads            ###
+############################################################
+## @param:                                                 #
+##       $threads: number of threads used                  #
+##       $out1: output file accepted 1                     #
+##       $out2: output file accepted 2                     #
+##       $dprct: number of bp not annotated by RepeatMasker#
+##       $eprct: number of repeated bases tolerated        #
+##       $readsHashTabR: reads to consider                 #
+##       $html_repertory: folder for html files            #
+############################################################
+
+sub sort_out
+{
+  my ($threads, $out1, $out2, $dprct, $eprct, $readsHashTabR, $html_repertory) = @_;
+  my ($name,$path) = fileparse($out2,'.fastq');
+  my %repeat;
+  my @garbage = (); my $cmp = 0;
+  my $repout = $html_repertory.'/'.$name."_repout/";
+  my $fa = $html_repertory.'/'.$name.".fa"; push (@garbage,$fa );
+  my $second = $html_repertory.'/'.$name."_temporary.fastq"; push (@garbage,$second);
+  mkdir $repout;
+  my %notLine;
+  
+  ##Write on file containing of readssHashTabR
+  
+  open(my $tmp, ">".$second) || die "cannot open temp file $second\n";
+  while ( my ($k,$v) = each %{$readsHashTabR} )
+  {
+    print $tmp ${$v}[1] if defined(${$v}[1]);
+  }
+  close $tmp;
+  
+  ## Transform fastq file to fasta
+  
+  `fastq_to_fasta -i $second -o $fa -Q33`;
+  
+  ##Launch RepeatMasker on fasta file
+  
+  `RepeatMasker -s -pa $threads -dir $repout -engine hmmer -species human $fa`;
+  my $repfile = $repout.$name.".fa.out";
+  open (my $rep, $repfile) || die "cannot open $repfile $!\n";
+  while(<$rep>)
+  {
+    chomp;
+    ## test the percent of repeats ##
+    my $string = $_;
+    $string =~ s/^\s+//;
+    next unless ($string =~ /^\d/);
+    $string =~ s/\s+/ /g;
+    my @line = split (' ',$string);
+    if ( exists($repeat{$line[4]}) )
+    {
+      $repeat{$line[4]}->[0] = $line[5] if $repeat{$line[4]}->[0] > $line[5];
+      $repeat{$line[4]}->[1] = $line[6] if $repeat{$line[4]}->[1] < $line[6];
+    }
+    else{ $repeat{$line[4]} = [$line[5],$line[6]];}
+  }
+  close $rep;
+  
+  ## store in table if pair passed the repeat test ##
+  while (my ($k, $v) = each %repeat)
+  {
+    $notLine{$k} = 1 unless ($v->[0] > $dprct || $v->[1] < $eprct);
+  }
+  
+  ##write resulting reads in both files for paired ##
+  open(my $accepted_1, ">".$out1 ) || die "cannot open $out1 file $!\n";
+  open(my $accepted_2, ">".$out2 ) || die "cannot open $out2 file $!\n";
+  while ( my ($k,$v) = each %{$readsHashTabR} )
+  {
+    if ( defined (${$v}[0]) && defined (${$v}[1]) )
+    {
+      unless (defined ($notLine{$k}) && $notLine{$k} == 1)
+      {
+        $cmp++;
+        print $accepted_1 ${$v}[0];
+        print $accepted_2 ${$v}[1];
+      }
+    }
+  }
+  close $accepted_1; close $accepted_2;
+  
+  ##drop files and directories generated by repeatmasker##
+  my $toErase = $repout.'*';
+  unlink glob "$toErase";
+  unlink @garbage; rmdir $repout;
+  return $cmp;
+}
+
+############################################################
+##Function that aligned paired-end reads on a referential###
+############################################################
+## @param:                                                 #
+##       $index: referential file                          #
+##       $fasq1: first file paired end reads               #
+##       $fasq2: second file paired end reads              #
+##       $sam: output alignment file                       #
+##       $threads: number of threads used                  #
+##       $mis: tolerated mismatches                        #
+############################################################
+sub align_paired
+{
+  my ($index, $fastq1, $fastq2, $sam, $threads, $mis) = @_ ;
+  my @garbage = ();
+  my $sai1 = $sam."_temporary.sai1"; push @garbage,$sai1;
+  my $sai2 = $sam."_temporary.sai2"; push @garbage,$sai2;
+  
+  ##alignement with bwa
+  
+  `bwa aln -n $mis -t $threads $index $fastq1 > $sai1`;
+  `bwa aln -n $mis -t $threads $index $fastq2 > $sai2`;
+  `bwa sampe $index $sai1 $sai2 $fastq1 $fastq2 > $sam`;
+  
+  ## delete temporary single aligned files
+  unlink @garbage;
+}
+
+############################################################
+##Function that aligned reads on a referential           ###
+############################################################
+## @param:                                                 #
+##       $index: referential file                          #
+##       $fasq: reads file                                 #
+##       $sam: output alignment file                       #
+##       $maxInsertSize: maximum size of insert            #
+##       $threads: number of threads used                  #
+############################################################
+
+sub align
+{
+  my ($index, $fastq, $sam, $maxInsertSize, $threads ) = @_ ;
+  `bwa aln -o4 -e$maxInsertSize -t $threads $index $fastq | bwa samse $index /dev/stdin $fastq > $sam `;
+}
+
+############################################################
+##Function results computes bed files for result         ###
+############################################################
+## @param:                                                 #
+##       $out_repository: repository to store results      #
+##       $file: sam file resulting of alignement           #
+##       $name: name of paireds end reads file             #
+##       $iprct: percentage of repeats tolerated           #
+##       $hashRef: store number for each first read value  #
+##       $rmsk: UCSC repeat sequences                      #
+##       $ps: number of the paired end file                #
+##       $garbage_ref: reference to garbage array          #
+############################################################
+
+sub results
+{
+  my ($out_repertory, $file, $name, $iprct, $hashRef, $rmsk, $ps, $garbage_ref) = @_;
+  my $namefirst = $out_repertory.'/'.$name.'-first.bed'; push(@$garbage_ref, $namefirst);
+  my $namesecond = $out_repertory.'/'.$name.'-second.bed'; push(@$garbage_ref, $namesecond);
+  
+  ## store reads mapped in proper pair respectively first and second in pair in bam files and transform in bed files##
+  `samtools view -Sb -f66 $file | bedtools bamtobed -i /dev/stdin > temp_name_first`;
+  `samtools view -Sb -f130 $file | bedtools bamtobed -i /dev/stdin > temp_name_second`;
+  
+  ##compute converage of second mate on rmsk##
+  my $baseCov = 0;
+  my %IdCov = ();
+  my @coverage = `bedtools coverage -a temp_name_second -b $rmsk`;
+  
+  
+  ## store coverage fraction ##
+  foreach my $covRmsk (@coverage)
+  {
+    chomp $covRmsk;
+    my @split_cov = split /\t/, $covRmsk;
+    ##generate identifier for IdCov ##
+    $split_cov[3] =~ /(.*?)\/[12]/;
+    ##store value in IdCov ##
+    if (!exists($IdCov{$1}))
+    {
+      $IdCov{$1} = $split_cov[-1];
+    }
+    else
+    {
+      $IdCov{$1} = $split_cov[-1] if $split_cov[-1] > $IdCov{$1};
+    }
+  }
+  
+  ## get only first mate that have less tant $iprct repeats ##
+  open (my $tmp_fi, 'temp_name_first') || die "cannot open $namefirst!\n";
+  open (my $nam_fi, ">".$namefirst) || die "cannot open $namefirst!\n";
+  while (<$tmp_fi>)
+  {
+    my @line = split /\t/, $_;
+    $line[3] =~ /(.*?)\/[12]/;
+    
+    if ($IdCov{$1} <= $iprct/100)
+    {
+      print $nam_fi $_;
+      
+      ${$hashRef}{$1}= $ps;
+    }
+  }
+  close $tmp_fi; close $nam_fi;
+  
+  
+  ## get only  second mate that have less than $iprct repeats ##
+
+  open (my $tmp_sec, 'temp_name_second') || die "cannot open $namesecond!\n";
+  open (my $nam_sec, ">".$namesecond) || die "cannot open $namesecond!\n";
+  while (<$tmp_sec>)
+  {
+    my @line = split /\t/, $_;
+    $line[3] =~ /(.*?)\/[12]/;
+    if ($IdCov{$1} <= $iprct/100)
+    {
+      print $nam_sec $_;
+    }
+  }
+  close $tmp_sec; close $nam_sec;
+}
+
+#sub results
+#{
+#  my ($out_repertory, $file, $name, $hashRef,$ps) = @_;
+#  my $namefirst = $out_repertory.'/'.$name.'-first.bed'; push(@garbage, $namefirst);
+#  my $namesecond = $out_repertory.'/'.$name.'-second.bed'; push(@garbage, $namesecond);
+#  `samtools view -Sb -f66 $file | bedtools bamtobed -i /dev/stdin > $namefirst`;
+#  `samtools view -Sb -f130 $file | bedtools bamtobed -i /dev/stdin > $namesecond`;
+#  open( my $in, $out_repertory.'/'.$name.'-first.bed') || die "cannot open first read bed\n";
+#  while (<$in>)
+#  {
+#    my @line = split /\t/, $_;
+#    $line[3] =~ /(.*?)\/1/;
+#    ${$hashRef}{$1}= $ps;
+#  }
+#}
+
+
+############################################################
+##Function blast: blast nucleotide sequences on ref      ###
+############################################################
+## @param:                                                 #
+##       $db: database where to search                     #
+##       $fasta: file containing nucleotide sequences      #
+##       $tabular: out file name                           #
+##       $threads: number of threads used                  #
+############################################################
+
+
+
+sub blast
+{
+  my ($db, $fasta, $tabular, $threads) = @_;
+  `blastn -db $db -query $fasta -num_threads $threads -out $tabular -outfmt 6 -evalue 10e-10`;
+}
+
+############################################################
+##Function extract_blast: extract result from blast      ###
+############################################################
+## @param:                                                 #
+##       $file: name of sequences file                     #
+## @return: hash that contains sequences                   #
+############################################################
+
+
+sub extract_blast
+{
+  my $file = shift;
+  my %hash = ();
+  open (my $f, $file) || die "cannot open $file\n";
+  while (<$f>)
+  {
+    chomp $_;
+    my ($seq,$id) = split /\t/,$_;
+    $seq = $1 if ($seq =~ /(\d+)-(.*?)-(\d+)-(\d+)/);
+    $hash{$seq} = [] unless exists $hash{$seq};
+    push @{$hash{$seq}}, $id;
+  }
+  close $f;
+  return \%hash;
+}
+  
+############################################################
+##Function print_header: header of html file             ###
+############################################################
+## @param:                                                 #
+############################################################
+
+sub print_header
+{
+  my $fileR = shift; my $title = shift;
+  print $fileR "<!DOCTYPE html>\n<html>\n<head>\n\t<title>$title</title>\n";
+  print $fileR "\t<style type=\"text/css\">\n";
+  print $fileR "\t\tbody { font-family:Arial, Helvetica, Sans-Serif; font-size:0.8em;}\n";
+  print $fileR "\t\t#report { border-collapse:collapse;}\n";
+  print $fileR "\t\t#report h4 { margin:0px; padding:0px;}\n";
+  print $fileR "\t\t#report img { float:right;}\n";
+  print $fileR "\t\t#report ul { margin:10px 0 10px 40px; padding:0px;}\n";
+  print $fileR "\t\t#report th { background:#7CB8E2 url(static/images/header_bkg.png) repeat-x scroll center left; color:#fff; padding:7px 15px; text-align:left;}\n";
+  print $fileR "\t\t#report td { background:#C7DDEE none repeat-x scroll center left; color:#000; padding:7px 15px; }\n";
+  print $fileR "\t\t#report tr.odd td { background:#fff url(static/images/row_bkg.png) repeat-x scroll center left; cursor:pointer; }\n";
+  print $fileR "\t\t#report div.arrow { background:transparent url(static/images/arrows.png) no-repeat scroll 0px -16px; width:16px; height:16px; display:block;}\n";
+  print $fileR "\t\t#report div.up { background-position:0px 0px;}\n";
+  print $fileR "\t</style>\n";
+  print $fileR "\t<script src=\"./js/jquery.min.js\" type=\"text/javascript\"></script>\n";
+  print $fileR "\t<script type=\"text/javascript\">\n";
+  print $fileR "\t\t\$(document).ready(function(){\n";
+  print $fileR "\t\t\t\$(\"#report tr:odd\").addClass(\"odd\");\n";
+  print $fileR "\t\t\t\$(\"#report tr:not(.odd)\").hide();\n";
+  print $fileR "\t\t\t\$(\"#report tr:first-child\").show();\n";
+  print $fileR "\t\t\t\$(\"#report tr.odd\").click(function(){\n";
+  print $fileR "\t\t\t\t\$(this).next(\"tr\").toggle();\n";
+  print $fileR "\t\t\t\t\$(this).find(\".arrow\").toggleClass(\"up\");\n";
+  print $fileR "\t\t\t});\n";
+  print $fileR "\t\t\t//\$(\"#report\").jExpand();\n";
+  print $fileR "\t\t});\n\t</script>\n";
+  print $fileR "</head>\n<body>\n\t<table id=\"report\">\n";
+}
+  
+############################################################
+##Function html_tab: definition of html file             ###
+############################################################
+## @param:                                                 #
+##       $fastq1_ref: reference to first paired end files  #
+##       $name_ref: reference to names of reads files      #
+##       $results_ref: reference to results files          #
+##       $rna: results for known RNA                       #
+##       $est: results for known EST                       #
+##       $html: html results file                          #
+##       $html_repertory: repository to store results      #
+############################################################
+
+sub html_tab
+{
+  my ($fastq1_ref, $name_ref, $results_ref, $rna, $est, $html, $html_repertory) = @_;
+  my $out = $html_repertory;
+  my @fastq1 = @{$fastq1_ref};
+  my @name = @{$name_ref};
+  my @results = @{$results_ref};
+  
+  # Copy HTML resources to results folder
+  File::Copy::Recursive::dircopy "$Bin/js/", "$out/js" or die "Copy failed: $!";
+  File::Copy::Recursive::dircopy "$Bin/static/", "$out/static" or die "Copy failed: $!";
+
+  my $chimOut = $html;
+  
+  open(my $tab, ">".$chimOut) || die "cannot open $chimOut";
+  print_header($tab,"Chimerae");
+  print $tab "\t\t<tr>\n\t\t\t<th>L1 chromosome</th>\n\t\t\t<th>L1 start</th>\n\t\t\t<th>L1 end</th>\n\t\t\t<th>L1 strand</th>\n";
+  for my $i (0..$#fastq1)
+  {
+    print $tab "\t\t\t<th>$name[$i] read #</th>\n";
+  }
+  print $tab "\t\t\t<th>Chimera chromosome</th>\n\t\t\t<th>Chimera start</th>\n\t\t\t<th>Chimera end</th>\n\t\t\t<th>Chimera strand</th>\n";
+  for my $i (0..$#fastq1)
+  {
+    print $tab "\t\t\t<th>$name[$i] read #</th>\n";
+  }
+  if(defined($rna))
+  {
+    print $tab "\t\t\t<th>Known RNA</th>\n";
+  }
+  else
+  {
+    print $tab "\t\t\t<th></th>\n";
+  }
+  if(defined($est))
+  {
+    print $tab "\t\t\t<th>Known EST</th>\n";
+  }
+  else
+  {
+    print $tab "\t\t\t<th></th>\n";
+  }
+  print $tab "\t\t\t<th></th>\n\t\t</tr>\n";
+  
+  for my $i (0..$#results)
+  {
+    print $tab "\t\t<tr>\n";
+    foreach my $j (@{$results[$i]})
+    {
+      print $tab "\t\t\t<td>$j</td>\n";
+    }
+    my ($Hrna, $Hest) = ('','');
+    $Hrna = ${$rna}{$i}[0] if exists(${$rna}{$i});
+    $Hest = ${$est}{$i}[0] if exists(${$est}{$i});
+    chomp $Hrna; chomp $Hest;
+    if($Hrna)
+    {
+      print $tab "\t\t\t<td><a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.ncbi.nlm.nih.gov/nuccore/$Hrna\">$Hrna</a></td>\n";
+    }
+    else
+    {
+      print $tab "\t\t\t<td></td>\n";
+    }
+    if($Hest)
+    {
+      print $tab "\t\t\t<td><a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.ncbi.nlm.nih.gov/nuccore/$Hest\">$Hest</a></td>\n";
+    }
+    else
+    {
+      print $tab "\t\t\t<td></td>\n";
+    }
+    print $tab "\t\t\t<td><div class=\"arrow\"></div></td>\n\t\t</tr>\n";
+    my $colspan = scalar(@fastq1) * 2 + 8 ;
+    print $tab "\t\t<tr>\n\t\t\t<td valign=top colspan=$colspan></td>\n\t\t\t<td valign=top>\n";
+    if (exists(${$rna}{$i}))
+    {
+      for (my $w = 1; $w <= $#{${$rna}{$i}}; $w++)
+      {
+        $Hrna = '';
+        $Hrna = ${$rna}{$i}[$w];
+        chomp $Hrna;
+        print $tab "\t\t\t\t<a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.ncbi.nlm.nih.gov/nuccore/$Hrna\">$Hrna</a><br>\n";
+      }
+      delete ${$rna}{$i};
+    }
+    print $tab "\t\t\t</td>\n\t\t\t<td valign=top>\n";
+    if (exists (${$est}{$i}))
+    {
+      for (my $w = 1; $w <= $#{${$est}{$i}}; $w++)
+      {
+        $Hest = '';
+        $Hest = ${$est}{$i}[$w];
+        chomp $Hest;
+        print $tab "\t\t\t\t<a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://www.ncbi.nlm.nih.gov/nuccore/$Hest\">$Hest</a><br>\n";
+      }
+      delete ${$est}{$i};
+    }
+    print $tab "\t\t\t</td>\n\t\t\t<td></td>\n\t\t</tr>\n";
+  }
+  print $tab "\t</table>\n</body>\n</html>\n";
+  close $tab;
+}
+  
+############################################################
+##Function save_csv: save results in different formats   ###
+############################################################
+## @param:                                                 #
+##       $fastq1_ref: reference to first paired end files  #
+##       $name_ref: reference to names of reads files      #
+##       $results_ref: reference to results files          #
+##       $line_only: Line only database                    #
+##       $refseq: refseq text file                         #
+##       $out: repository to store results                 #
+############################################################
+sub save_csv{
+  my ($fastq1_ref, $name_ref, $results_ref, $line_only, $refseq, $out) = @_;
+  my @fastq1 = @{$fastq1_ref};
+  my @name = @{$name_ref};
+  my @results = @{$results_ref};
+  my $out1= $out.'/results.txt';
+  my $out2= $out.'/first_results.txt';
+  my $out3= $out.'/final_result_chimerae.txt';
+
+  # save result in csv file ##
+  
+  my $filed = $out1;
+  open(my $tab, ">".$filed) || die "cannot open $filed";
+  print $tab "L1 chromosome \t L1 start \t L1 end \t L1 strand";;
+  for my $i (0..$#fastq1)
+  {
+    print $tab "\t $name[$i] read #";
+  }
+  print $tab "\t Chimera chromosome\t Chimera start \t Chimera end \t Chimera strand";
+  for my $i (0..$#fastq1)
+  {
+    print $tab "\t $name[$i] read #";
+  }
+  print $tab "\n";
+  for my $i ( 0 .. $#results )
+  {
+    my $rowref = $results[$i];
+    my $n = @$rowref - 1;
+    for my $j ( 0 .. $n-1 )
+    {
+      print $tab "$results[$i][$j]\t";
+    }
+    print $tab "$results[$i][$n]\n";
+  }
+  close $tab;
+  
+  ##Add some information via R Scripts##
+  
+  # Create bridge between Perl and R
+  my $R = Statistics::R->new();
+  $R->start();
+  $R->set('out1', $out1);
+  $R->set('out2', $out2);
+  $R->set('out3', $out3);
+  $R->set('nfastq', $#fastq1);
+  $R->set('line_only', $line_only);
+  $R->set('refseq', $refseq);
+  my $R_out = $R->run_from_file("$Bin/CLIFinder_results.R");
+  $R->stop();
+  print STDOUT "$R_out\n";
+}
+
+__END__
+
+=head1 NAME
+
+        CLIFinder - Identification of L1 Chimeric Transcripts in RNA-seq data
+
+=head1 SYNOPSIS
+
+        CLIFinder.pl --first <first fastq of paired-end set 1> --name <name 1> --second <second fastq of paired-end set 1> [--first <first fastq of paired-end set 2> --name <name 2> --second <second fastq of paired-end set 2> ...] --ref <reference genome> [--build_ref] --TE <transposable elements> [--build_TE] --html <results.html> --html-path <results directory> [options]
+
+        Arguments:
+                --first <fastq file>    First fastq file to process from paired-end set
+                --name <name>           Name of the content to process
+                --second <fastq file>   Second fastq file to process from paired-end set
+                --ref <reference>       Fasta file containing the reference genome
+                --TE <TE>               Fasta file containing the transposable elements
+                --rmsk <text file>      Tab-delimited text file (with headers) containing reference repeat sequences (e.g. rmsk track from UCSC)
+                --refseq <text file>    Tab-delimited file (with headers) containing reference genes (e.g. RefGene.txt from UCSC)
+                --html <html file>      Main HTML file where results will be displayed
+                --html_path <dir>       Folder where results will be stored
+
+        For any fasta file, if a bwa index is not provided, you should build it through the corresponding '--build_[element]' argument
+
+        Options:
+                --rnadb <RNA db>        Blast database containing RNA sequences (default: empty)
+                --estdb <EST db>        Blast database containing EST sequences (default: empty)
+                --size_read <INT>       Size of reads (default: 100)
+                --BDir <0|1|2>          Orientation of reads (0: undirectional libraries, 1: TEs sequences in first read in pair, 2: TEs sequences in second read in pair) (default: 0)
+                --size_insert <INT>     Maximum size of insert tolerated between R1 and R2 for alignment on the reference genome (default: 250)
+                --min_L1 <INT>          Minimum number of bp matching for L1 mapping (default: 50)
+                --mis_L1 <INT>          Maximum number of mismatches tolerated for L1 mapping (default: 2)
+                --min_unique <INT>      Minimum number of consecutive bp not annotated by RepeatMasker (default: 33)
+                --threads <INT>         Number of threads (default: 1)
+
+        For Blast database files, if a fasta is provided, the database can be built with '--build_[db]'. Otherwise, provide a path or URL. \"tar(.gz)\" files are acceptable, as well as wild card (rna*) URLs.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/CLIFinder_results.R	Tue Feb 11 09:28:56 2020 -0500
@@ -0,0 +1,224 @@
+#!/usr/bin/env Rscript
+
+args = commandArgs(trailingOnly = TRUE)
+missing_args = TRUE
+
+if (length(args) == 0 && exists("out1") && exists("out2") && exists("out3") && exists("nfastq") && exists("line_only") && exists("refseq"))
+{
+  missing_args = FALSE
+} else if(length(args) == 6)
+{
+  missing_args = FALSE
+  out1 = args[1]
+  out2 = args[2]
+  out3 = args[3]
+  nfastq = as.numeric(args[4])
+  line_only = args[5]
+  refseq = args[6]
+}
+
+if(missing_args)
+{
+  stop("6 arguments must be supplied or the variables must be set before calling the script.", call. = FALSE)
+} else {
+  suppressPackageStartupMessages(library(GenomicRanges))
+  suppressPackageStartupMessages(library(plyr))
+
+  chim <- read.delim(out1)
+  
+  chim <- chim[order(chim[, nfastq+7], decreasing = F), ]
+  chim <- chim[order(chim[, 2], decreasing = F), ]
+  chr <- sub("chr", "", as.character(chim[, 1]))
+  suppressWarnings(chim <- chim[order(as.numeric(chr)), ])
+  
+  grchim <- GRanges(seqnames = chim[, 1],
+                    IRanges(start = chim[, 2],
+                            end = chim[, 3]), strand = chim[, 4])
+  
+  grchim$ID <- paste("Id_", 1:length(chim[, 1]), sep = "")
+  
+  mcols(grchim) <- cbind(mcols(grchim), chim[, 5:(nfastq+9)])
+  
+  grfusR <- union(grchim, grchim)
+  
+  suppressWarnings(position <- as.data.frame(findOverlaps(grfusR, grchim)))
+  
+  grfusR$dup <- as.vector(table(position[, 1]))
+  
+  suppressWarnings(position2 <- as.data.frame(findOverlaps(grfusR[grfusR$dup>1], grchim)))
+  
+  grfusR2 <- grfusR
+  strand(grfusR2) <- "+"
+  gr3 <- union(grfusR2, grfusR2)
+  suppressWarnings(position3 <- as.data.frame(findOverlaps(gr3, grfusR2)))
+  gr3$dup <- as.vector(table(position3[, 1]))
+  
+  suppressWarnings(position3 <- as.data.frame(findOverlaps(gr3[gr3$dup>1], grfusR2)))
+  grfusR$info <- "no"
+  grfusR$info [position3[, 2]] <- "overlap sens opposé"
+  
+  grfusR$ID <- "Id"
+  grfusR$ID[position[!duplicated(position[, 1]), 1]] <- grchim$ID[position[!duplicated(position[, 1]), 2]]
+  
+  if(nrow(position2) != 0)
+  {
+    result <- aggregate(position2[, 2] ~ position2[, 1], data = position2, paste, collapse = "_")
+    grfusR$ID[grfusR$dup>1] <- paste("ID", result[, 2], sep = "_")
+  }
+  
+  mcols(grfusR) <- cbind(mcols(grfusR), mcols(grchim[position[!duplicated(position[, 1]), 2]]))
+  
+  min <- ddply(as.data.frame(grchim), .(seqnames, end, strand), function(x)x[x$Chimera.start == min(x$Chimera.start), ])
+  min <- ddply(as.data.frame(min), .(seqnames, start, strand), function(x)x[x$Chimera.start == min(x$Chimera.start), ])
+  max <- ddply(as.data.frame(grchim), .(seqnames, end, strand), function(x)x[x$Chimera.end == max(x$Chimera.end), ])
+  max <- ddply(as.data.frame(max), .(seqnames, start, strand), function(x)x[x$Chimera.end == max(x$Chimera.end), ])
+  
+  grfusR <- as.data.frame(grfusR)
+  grfusR <- grfusR[order(grfusR[, 1], grfusR[, 2], grfusR[, 3], grfusR[, 4], decreasing = F), ]
+  
+  grfusR$Chimera.start <- min$Chimera.start
+  grfusR$Chimera.end <- max$Chimera.end
+  
+  datax <- as.data.frame(grfusR)
+  colnames(datax)[1:3] <- colnames(chim)[1:3]
+  colnames(datax)[5] <- colnames(chim)[4]
+  
+  grchim2 <- GRanges(seqnames = datax[, nfastq+11],
+                     IRanges(start = datax[, nfastq+12],
+                             end = datax[, nfastq+13]), strand = datax[, nfastq+14])
+  
+  mcols(grchim2) <- datax[, -c(4, nfastq+11:nfastq+14)]
+  
+  grfus <- union(grchim2, grchim2)
+  
+  suppressWarnings(position <- as.data.frame(findOverlaps(grfus, grchim2)))
+  
+  grfus$dup <- as.vector(table(position[, 1]))
+  
+  suppressWarnings(position2 <- as.data.frame(findOverlaps(grfus[grfus$dup>1], grchim2)))
+  
+  grfus$ID_final <- "Id"
+  grfus$ID_final[position[!duplicated(position[, 1]), 1]] <- grchim2$ID[position[!duplicated(position[, 1]), 2]]
+  
+  if(nrow(position2) != 0)
+  {
+    result <- aggregate(position2[, 2] ~ position2[, 1], data = position2, paste, collapse = "_")
+    grfus$ID_final[grfus$dup>1] <- paste("Id", result[, 2], sep = "_")
+  }
+  
+  mcols(grfus) <- cbind(mcols(grfus), mcols(grchim2[position[!duplicated(position[, 1]), 2]]))
+  
+  for (i in 0:nfastq)
+  {
+    mcols(grfus)[grfus$dup>1, 11+i] <- mcols(grfus)[grfus$dup>1, 11+i] + mcols(grchim2)[position[duplicated(position[, 1]), 2], 9+i]
+  }
+  
+  grfus2 <- grfus
+  strand(grfus2) <- "+"
+  gr3 <- union(grfus2, grfus2)
+  
+  suppressWarnings(position3 <- as.data.frame(findOverlaps(gr3, grfus2)))
+  gr3$dup <- as.vector(table(position3[, 1]))
+  
+  suppressWarnings(position3 <- as.data.frame(findOverlaps(gr3[gr3$dup>1], grfus2)))
+  grfus$info [position3[, 2]] <- "overlap sens opposé"
+  
+  min <- ddply(as.data.frame(grchim2), .(seqnames, end, strand), function(x)x[x$L1.start == min(x$L1.start), ])
+  min <- ddply(data.frame(min), .(seqnames, start, strand), function(x)x[x$L1.start == min(x$L1.start), ])
+  max <- ddply(as.data.frame(grchim2), .(seqnames, end, strand), function(x)x[x$L1.end == max(x$L1.end), ])
+  max <- ddply(data.frame(max), .(seqnames, start, strand), function(x)x[x$L1.end == max(x$L1.end), ])
+  
+  grfus1 <- as.data.frame(grfus)
+  grfus1 <- grfus1[order(grfus1[, 1], grfus1[, 2], grfus1[, 3], grfus1[, 4], decreasing = F), ]
+  
+  grfus1$L1.start <- min$L1.start
+  grfus1$L1.end <- max$L1.end
+  
+  dataf <- as.data.frame(grfus1)
+  
+  result <- (data.frame("Chimera.Chr" = dataf$L1.chromosome,
+                      "Chimera.Start" = apply(data.frame(dataf$start,
+                                                         dataf$end,
+                                                         dataf$L1.start,
+                                                         dataf$L1.end), 1, min),
+                      "Chimera.End" = apply(data.frame(dataf$start, dataf$end, dataf$L1.start, dataf$L1.end), 1, max),
+                      "Chimera.Strand" = dataf$L1.strand,
+                      "L1.Chr" = dataf$L1.chromosome,
+                      "L1.Start" = dataf$L1.start,
+                      "L1.End" = dataf$L1.end,
+                      "L1.Strand" = dataf$L1.strand,
+                      "Unique.Chr" = dataf$seqnames,
+                      "Unique.Start" = dataf$start,
+                      "Unique.End" = dataf$end,
+                      "Unique.Strand" = dataf$strand,
+                      "ID_final" = dataf$ID_final,
+                      "info" = dataf$info,
+                      dataf[, 16:(nfastq+16)]))
+  
+  result <- result[order(result[, 2], decreasing = F), ]
+  chr <- sub("chr", "", as.character(result[, 1]))
+  suppressWarnings(result <- result[order(as.numeric(chr)), ])
+  options(scipen = 10)
+  write.table(result, out2, sep = "\t", row.names = F, quote = F)
+  grchim <- GRanges(seqnames = result$L1.Chr,
+                    IRanges(start = result$L1.Start,
+                    end = result$L1.End), strand = result$L1.Strand)
+  mcols(grchim) <- result
+  
+  Rep <- read.delim(line_only, skip = 1)
+  grLINE <- GRanges(seqnames = Rep$genoName,
+                    IRanges(start = Rep$genoStart,
+                            end = Rep$genoEnd),
+                    repStrand = as.character(Rep$strand),
+                    repName = as.character(Rep$repName))
+  
+  Gene <- read.delim(refseq)
+  grGene <- GRanges(seqnames = Gene$chrom,
+                    IRanges(start = Gene$txStart,
+                            end = Gene$txEnd),
+                    geneStrand = as.character(Gene$strand),
+                    geneName = as.character(Gene$name2))
+  
+  suppressWarnings(position <- as.data.frame(findOverlaps(grchim, grLINE)))
+  suppressWarnings(position2 <- as.data.frame(findOverlaps(grchim, grGene)))
+  
+  grchim$GeneName <- "no_gene"
+  grchim$GeneName[position2[, 1]] <- grGene$geneName[position2[, 2]]
+  
+  grchim$GeneStrand <- "*"
+  grchim$GeneStrand[position2[, 1]] <- grLINE$repStrand[position2[, 2]]
+  
+  grchim$repName <- "no"
+  grchim$repName[position[, 1]] <- grLINE$repName[position[, 2]]
+  
+  grchim$repStart <- 0
+  grchim$repStart[position[, 1]] <- start(grLINE[position[, 2]])
+  
+  grchim$repEnd <- 0
+  grchim$repEnd[position[, 1]] <- end(grLINE[position[, 2]])
+  
+  grchim$repWidth <- 0
+  grchim$repWidth[position[, 1]] <- width(grLINE[position[, 2]])
+  
+  grchim$repStrand <- "*"
+  grchim$repStrand[position[, 1]] <- grLINE$repStrand[position[, 2]]
+  
+  dup <- position[duplicated(position[, 1]), 1]
+  if(length(dup != 0))
+  {
+    for (i in 1:length(dup))
+    {
+      grchim$repName[dup[i]] <- paste(grLINE$repName[position[position[, 1] == dup[i], 2]], collapse = "/")
+      grchim$repStart[dup[i]] <- paste(start(grLINE[position[position[, 1] == dup[i], 2]]), collapse = "/")
+      grchim$repEnd[dup[i]] <- paste(end(grLINE[position[position[, 1] == dup[i], 2]]), collapse = "/")
+      grchim$repWidth[dup[i]] <- paste(width(grLINE[position[position[, 1] == dup[i], 2]]), collapse = "/")
+      grchim$repStrand[dup[i]] <- paste(grLINE$repStrand[position[position[, 1] == dup[i], 2]], collapse = "/")
+    }
+  }
+  
+  final_result <- as.data.frame(grchim)
+  options(scipen = 10)
+  write.table(final_result[, -c(1:5)], out3, sep = "\t", row.names = F, quote = F)
+  print("Executed R script")
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/script/js/jquery.min.js	Tue Feb 11 09:28:56 2020 -0500
@@ -0,0 +1,19 @@
+/*
+ * jQuery JavaScript Library v1.3.2
+ * http://jquery.com/
+ *
+ * Copyright (c) 2009 John Resig
+ * Dual licensed under the MIT and GPL licenses.
+ * http://docs.jquery.com/License
+ *
+ * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
+ * Revision: 6246
+ */
+(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
+/*
+ * Sizzle CSS Selector Engine - v0.9.3
+ *  Copyright 2009, The Dojo Foundation
+ *  Released under the MIT, BSD, and GPL Licenses.
+ *  More information: http://sizzlejs.com/
+ */
+(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})();
Binary file script/static/images/arrows.png has changed
Binary file script/static/images/header_bkg.png has changed
Binary file script/static/images/row_bkg.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/TE.fa	Tue Feb 11 09:28:56 2020 -0500
@@ -0,0 +1,180 @@
+>L1PA1
+GGGGGGAGGAGCCAAGATGGCCGAATAGGAACAGCTCCGGTCTACAGCTCCCAGCGTGAG
+CGACGCAGAAGACGGTGATTTCTGCATTTCCATCTGAGGTACCGGGTTCATCTCACTAGG
+GAGTGCCAGACAGTGGGCGCAGGCCAGTGTGTGTGCGCACCGTGCGCGAGCCGAAGCAGG
+GCGAGGCATTGCCTCACCTGGGAAGCGCAAGGGGTCAGGGAGTTCCCTTTCCGAGTCAAA
+GAAAGGGGTGACGGACGCACCTGGAAAATCGGGTCACTCCCACCCGAATATTGCGCTTTT
+CAGACCGGCTTAAGAAACGGCGCACCACGAGACTATATCCCACACCTGGCTCGGAGGGTC
+CTACGCCCACGGAATCTCGCTGATTGCTAGCACAGCAGTCTGAGATCAAACTGCAAGGCG
+GCAACGAGGCTGGGGGAGGGGCGCCCGCCATTGCCCAGGCTTGCTTAGGTAAACAAAGCA
+GCCGGGAAGCTCGAACTGGGTGGAGCCCACCACAGCTCAAGGAGGCCTGCCTGCCTCTGT
+>L1PA2
+GGGGGGAGGAGCCAAGATGGCCGAATAGGAACAGCTCCGGTCTACAGCTCCCAGCGTGAG
+CGACGCAGAAGACGGGTGATTTCTGCATTTCCATCTGAGGTACCGGGTTCATCTCACTAG
+GGAGTGCCAGACAGTGGGCGCAGGTCAGTGGGTGCGCGCACCGTGCGCGAGCCGAAGCAG
+GGCGAGGCATTGCCTCACTTGGGAAGCGCAAGGGGTCAGGGAGTTCCCTTTCCGAGTCAA
+AGAAAGGGGTGACGGACGCACCTGGAAAATCGGGTCACTCCCACCCGAATATTGCGCTTT
+TCCGACGGGCTTAAAAAACGGCGCACCACGAGATTATATCCCGCACCTGGCTCGGAGGGT
+CCTACGCCCACGGAGTCTCGCTGATTGCTAGCACAGCAGTCTGAGATCAAACTGCAAGGC
+GGCAGCGAGGCTGGGGGAGGGGCGCCCGCCATTGCCCAGGCTTGCTTAGGTAAACAAAGC
+AGCCGGGAAGCTCGAACTGGGTGGAGCCCACCACAGCTCAAGGAGGCCTGCCTGCCTCTG
+>L1PA3
+GGGGGGAGGAGCCAAGATGGCCGAATAGGAACAGCTCCGGTCTACAGCTCCCAGCGTGAG
+CGACGCAGAAGACGGGTGATTTCTGCATTTCCATCTGAGGTACCGGGTTCATCTCACTAG
+GGAGTGCCAGACAGTGGGCGCAGGACAGTGGGTGCAGCGCACCGTGCGCGAGCCGAAGCA
+GGGCGAGGCATTGCCTCACTCGGGAAGCGCAAGGGGTCAGGGAGTTCCCTTTCCTAGTCA
+AAGAAAGGGGTGACAGACGGCACCTGGAAAATCGGGTCACTCCCACCCTAATACTGCGCT
+TTTCCGACGGGCTTAAAAAACGGCACACCAGGAGATTATATCCCGCACCTGGCTCGGAGG
+GTCCTACGCCCACGGAGTCTCGCTGATTGCTAGCACAGCAGTCTGAGATCAAACTGCAAG
+GCGGCAGCGAGGCTGGGGGAGGGGCGCCCGCCATTGCCCAGGCTTGCTTAGGTAAACAAA
+GCAGCCGGGAAGCTCGAACTGGGTGGAGCCCACCACAGCTCAAGGAGGCCTGCCTGCCTC
+>L1PA4
+GGGGGGAGGAGCCAAGATGGCCGAATAGGAACAGCTCCGGTCTACAGCTCCCAGCGTGAG
+CGACGCAGAAGACGGGTGATTTCTGCATTTCCAACTGAGGTACCGGGTTCATCTCACTGG
+GGAGTGCCAGACAGTGGGTGCAGGACAGTGGGTGCAGCGCACCGTGCGTGAGCCGAAGCA
+GGGCGAGGCATTGCCTCACCCGGGAAGCGCAAGGGGTCAGGGAATTCCCTTTCCTAGTCA
+AAGAAAGGGGTGACAGACGGCACCTGGAAAATCGGGTCACTCCCACCCTAATACTGCGCT
+TTTCCAACGGGCTTAACAAACGGCACACCAGGAGATTATATCCCGCACCTGGCTCGGAGG
+GTCCTACGCCCACGGAGCCTCGCTCATTGCTAGCACAGCAGTCTGAGATCAAACTGCAAG
+GCGGCAGCGAGGCTGGGGGAGGGGCGCCCGCCATTGCCCAGGCTTGAGTAGGTAAACAAA
+GCAGCCGGGAAGCTCGAACTGGGTGGAGCCCACCACAGCTCAAGGAGGCCTGCCTGCCTC
+>L1PA5
+GGGGGGAGGAGCCAAGATGGCCGAATAGGAACAGCTCCGGTCTACAGCTCCCAGCGTGAG
+CGACGCAGAAGACGGGTGATTTCTGCATTTCCAACTGAGGTACCGGGTTCATCTCACTGG
+GGCTTGTCAGACAGTGGGTGCAGGACAGTGGGTGCAGCCCACCGAGCGTGAGCCAAAGCA
+GGGCGAGGCATTGCCTCACCCGGGAAGCGCAAGGGGTCAGGGAATTCCCTTTCCTAGCCA
+AGGGAAGCTGTGACAGACGGCACCTGGAAAATCGGGTCACTCCCACCCTAATACTGCGCT
+TTTCCAATGGTCTTAGCAAACGGCACACCAGGAGATTATATCCCGCGCCTGGCTCGGAGG
+GTCCCACGCCCACGGAGCCTCGCTCATTGCTAGCACAGCAGTCTGAGATCGAACTGCAAG
+GCGGCAGCGAGGCTGGGGGAGGGGCGCCCGCCATTGCTGAGGCTTGAGTAGGTAAACAAA
+GTAGCCGGGAAGCTCGAACTGGGTGGAGCCCACCGCAGCTCAAGGAGGCCTGCCTGCCTC
+>L1PA6
+CCAAGATGGCCGAATAGGAACAGCTCCGGTCTGCAGCTCCCAGCGTGATCGACGCAGAAG
+ACGGGTGATTTCTGCATTTCCAACTGAGGTACCTGGTTCATCTCATTGGGACTGGTTGGA
+CAGTGGGTGCAGCCCACGGAGGGTGAGCCGAAGCAGGGCGGGGCATCGCCTCACCTGGGA
+AGCGCAAGGGGTCGGGGATTTCCCTTTCCTAGCCAAGGGAAGCCGTGACAGACTGTACCT
+GGAAAAACGGGACACTCCCGCCCAAATACTGCGCTTTTCCAATGGTCTTAGCAAACGGCA
+GACCAGGAGATTATATCCCGTGCCTGGCTCGGCGGGTCCCACGCCCATGGAGCCTTGCTC
+ACTGCTAGCGCAGCAGTCTGAGATCCACCTGCAAGGCAGCAGCCTGGCAGGGGGAGGGGC
+GTCCACCATTGCTGAGGCTTGAGTAGGTAAACAAAGTGGCCAGGAAGCTCGAACTGGGTG
+GAGCCCACCGCAGCTCAGCAAGGCCTGCTGCCTCTGTAGACTCCACCTCTGGGGGCAGGG
+>L1PA7
+GGTGGCTGGCAAGATGGCCGAATAGGAACAGCTCCGGTCTGCAGCTCCCAGCGAGATCAA
+CGCAGAAGGCGGGTGATTTCTGCATTTCCAACTGAGGTACCCGGTTCATCTCATTGGGAC
+TGGTTAGACAGTGGGTGCAGCCCACGGAGGGCGAGCCAAAGCAGGGTGGGGCGTCGCCTC
+ACCCGGGAAGCACAAGGGGTTGGGGAACTCCCTCCCCTAGCCAAGGGAAGCCATGAGGGA
+CTGTGCCATGAGGAATGGTGCACTCCGGCCCAGATACTACGCTTTTCCCACGGTCTTCAC
+AACCCGCAGACCAGGAGATTCCCTCGGGTGCCTACACCACCAGGGCCCTGGGTTTCAAGC
+ACAAAACTGGGCGGCCATTTGGGCAGACACCGAGCTAGCTGCAGGAGTTTTTTTTTTCAT
+ACCCCAGTGGCGCCTGGAATGCCAGCGAGACAGAACCGTTCACTCCCCTGGAAAGGGGGC
+TGAAGCCAGGGAGCCAAGTGGTCTAGCTCAGTGGATCCCACCCCCACGGAGCCCAGCAAG
+>L1PA8
+TGGCTGGCAAGATGGCCGAATAGGAACAGCTCCGGTCTGCAGCTCCCAGCGAGACCAATG
+CAGAAGGCAGGTGATTTCTGCATTTCCAACTGAGGTACCCAGTTCATCTCATTGGGACTG
+GTTAGGCAGTGGGTGCAACCCACAGAGGGCAAGCAGAAGCAGGGTGGGGCGTCGCTTCAC
+CCAGGAAGTGCAAGGAGCTGGGGGACCTCCCTCCCCCAGCCAAGGGAAGCAGTGAGGGAC
+TGTGCTACCCGGCCCGGATACTACGCTTTTCCCACGGTTTTTGCAATCCGCAGATCAGGA
+GATTCCCTTGTGTGCCTACACCACCAGGGCCCTGGGTTTCAAGCACAAAACTGGGCAGCT
+GTTTGGGCAGACACCGAGCTAGCTGCAGGAGTTTTTTTTCATACCCCAGTGGCACCTGGA
+ACCCCAGCGAGACAGAACCTTTCACTCCCCTGGAAAGGGGGCTGAAGCCAGGGAGCCAAG
+TGGTCTCGCTCAGCAGGTCCCACTCCCACGGAGCCCAGCAAGCTAAGAACCACTGGCTTG
+>L1PA8A
+GGGGTGGGGCCAAGATGGCCGACTAGAAGCAGTGGTGTTCGGAGGCTCCCATCGAAAAGA
+ACCATAATAAGCATGTGAATCCTTCACCGGCAACCAAGGTATCCAGGTTCTCTCATCAAA
+ATTGACTAGAAGGCTGGCGTGACCCACGGAGAGAAGGAAGAGCAGTGTGGTGCGGTGGCC
+CACCTGAGAGCCACACGGGGAAGGGGAGCCCCCTCCCCCCAGCCAAGGGAGGCGGTGAGT
+GAGCGTGCTACCCAGCCGGGGAAACCGTGCTTTTTCCACGGAACTGTGCAACCCATGGAT
+CGGAAGATCCCACTCGTGAACCCATGCCACCGGGGCCTAGGGTCCCAACCCCAGAACGCG
+CAGATTCTTACAGCCTCTCAGCTGGAATCTGCTTAAGCCTACCGAACTCCCGGGGGGAGG
+GGCGACCAGCACCAGCTGCAGCTGCCTGCTGTCTAAGCCATTTGAGCTCCTTGGGGGAGA
+GGCAGCAGCCAGCACTGGGACTCACAACTGCCTAACACACTAAGCTCCCTGGGCGGGGGA
+>L1PA10
+GGGGGGAGGGGCCAAGATGGCCAACTAGAAACAGCTGTCGTCGGAGGCTCCCACCGAGAA
+GAATGAAAACAGCAAGTGAATCCTGCACCGGCAACTGAGGTATCCAGGTTCTCTCATTGG
+GACTGACTAGGCGGTTGGCGCGACCCACGGAGAGCGAGGAAAAGCGGGGTGGTGTGACGG
+CCCACCTGGGAGCCACACGGGGCAAGGGGAGCTCCCACCCCCAGCCAAGGGAGGCAGTGA
+GTGATCGTGCTACCCTGCCTAGGAAACCACACTTTTTCCACGGATCTGTGCAACCCACGG
+ATCAGGAGATCCCCCTCGTGAGCCCACGCCACCAGGGCCTTGGGTCCCAAGCACAGAGCT
+GTGCAGATTCTCAGCAGCCACTCGCTGGAGACTGCCTAAGACTACCGAGTTCCTGGGGGG
+AGGGGTGGCCATCATCACTCCGGCTGCCTTCTGCCTAAGAAGACTGAGCTCCCTGGGGGA
+GGGGAGGCAGCCATCACTGCAGCTCCAGTGTGCCACTTTTCTCCTGCCGGTGCCAGGGAG
+>L1PA11
+GGAGGGGGCCAAGATGGCCGATTAGAAGCAGCTGCAGTCTGCAGCACTCACAGAGAGGAA
+TGAAAAGGGCAAGTGAATTCAGCACCTTCAACTGAAATATCCAGGTTCTCACATTGGGAC
+TGACTAGGCAAACAACTCAACCCATGGAGAATGAAGAAAAGCAGGGTGGGGCGATGGCCC
+ACCCAGGAGCGGCACAGAGCCAAGGGAACCCCCACCCCCAGCCAAGGGAAGCGGTGAGTG
+ATTGTGCGACCCTGCCTGGGAAACCACGCTTCTCCCATGGATCTTTGCAACCCATGGATC
+AGGAGATCCCCTCGTGAGCCCATACCACCAGGGCCTTGGGTCCGATACACAGAGCTGTGT
+GGAGTCTCGGCAGAGCAGCTGCTCAGGCACACACAGAGACCCAGGAGTTTTACATACTCC
+GGCCCCGGGATTCCCAGCAAGGCAGGAGATCCATCCATACATACCCCTAGGAAGGGGGCT
+GAATCCAGGGAGCCAAGCAGCATCATTCTGTGGGCCCCACTTCCACGGCACCTCACAAGT
+>L1PA12
+GGAGGTGGCCAAGATGGCCGACTAGAAGCAGCTAGTGTGTGTGGCTCTCACGGAGAGGAA
+CGGAAGGGGCGAGTAAATACAGCACCTTCAACTGAAACATCCAGGTACTCGCATTGGGAC
+TAATCAAGGAAACAACTCGACCCACGGAGAATGGAGAAAAGCAAGGCAGGACGACGGCCC
+ACCCGGGAGCGACACGGAGCCAGGGGAACCTCCCCTGCCCAGGGAAGCGGTGAGTGAATG
+TGCGACCCCGGGAAACCACGCTTCTCCCATGGATCTTTGCAACCCTCGGGTCAGGAGATC
+CCCTCGTGAACCCACTCCACCAGGGCCTTCAGTCTGACACACAGAGCTACGTGGAGTCTC
+GGCAGAGCAGCCGCTCAGGCACGCGCGGAGACCCNGGAGCCTTAGATACCCGGGCTTTCT
+GGGCTTCCCGGCAAAAGTAGCTGCAACTCCGGCAAAGTGGGAGGTTAGACCCCCGTACAT
+ACCCCTAGGAAAGAGGCTGAATCCAGGGGGCTGAGCAGCGACAGCCTGCAGGCCCCACTT
+>L1PA13B
+GGGAGTGGCCAAGATGGCCGACTAGAAGCAGCTAGGGTGTGTGGCTCTCATGGAGAGGAA
+TGAAAGAGGCAAGTAAATACAGCACCTTCAACTGAAACATCCAGGTACTCACATTGGGAC
+TAATCAAGGAAACAACTTAACCCACAGAGAATGGAGAAAAGCAAGGCAGGACGACAGCCC
+ACCTGGGAGTAACACGGAGCCAAGGGAACCTCCCCTGCCCAGGGAAGCAGTGAGTGAATG
+TGCAACCCCAGGAAACCACGCTTCTCCCATGGATCTTTGCAACCCTCGGGTCAGGAGATC
+CCCTCGTGAACCCACTCCACCAGGGCCTTCAGTCTGACACACAGAGCTACGTGGAGTCTT
+GGCAGAGCAGCCACTCAGGCATGCGTGGAGACCTAGGAGCTTTACATACTCCGGCTCTGG
+GCTTCCTGGCAAAAGTAACTGCAACTCCGGCAAAGTGGGAGGTTAGACCCCCATACATAC
+CCCTAGGAAAGAGGCTGAATCCAGGGGGCTAAGCAGCAATGGTCTGCAGGCCCCACTTCC
+>L1PA13A
+GCAAGATGGCTAACTAGACACAGCCAGGTGGAACAGCTGCCACCGAGGGACCAAGATGAC
+TGGCGCACTCCTAACAGATCTTCAGAGGGAAGGCACTGAGAGTGGACAGAGGGAAGACAC
+AGAAGCTGGGCTGAAGGGGGAGGAAGCTGGGAACCCTGCATGGGGCTACTATACACCAGG
+ACTCATTCCTGGCCCCCAATGACTCCGGGGGAATGGGTGAGTTGAACTGGCAAGGAGCAA
+CCTGCTCTCGCCATAGGCCTCTGGAATCCTGGCAGGAGGAGACCCCTTGACCACCACAGA
+CACTTGAGTTGGCAGGGAGAGCTGCTTAGAGAAGTGGTAGGGGCAGCACTCCAGCTGATG
+TAGAGCCCAGAGGGTTTGGTGCAGGAGCATCTGTAGTGGAGCATGGCCAGGGATGCCCAT
+CCCCCTAGGCTCAACTTGCTCCCATAGGAGACTTTAGCCCTAGGGGAACTGTCAGACCTG
+AACTCTGCAGGGCAGTCTTGCCCATCAGACGGGGCCAGTCTGACCTGAGCACCCCTTGGT
+>L1PA14
+GGGAGTGGCCAAGATGGCCGACTAGAAGCAGCTAGTGTGTGTGGCTCTCACGGAGAGGAA
+CAGAAGGGGTGAGTAAATACAACACCTTCAACTGAAACATCCAGGTACTCGCATTGGGAC
+TAATCAAGGAAACAACTTGACCCACAGAGAATGAAGAAAAGCAAGGCAGGATAACAGCCC
+ACCTGGGAGCAACACGGAGCCAGGGGAACCTCCCCTACCCAGGGAAGTAGTGAGTGAATG
+AGTGACCCCGGGAAACCATGCTTCTCCCACAGATCTTTGCAACCCTCAGGTCAGGAGATC
+CCCTTGTGAACCCACTCCACCAGGGCCTTCAGTCTGACACACAGAGCTATGTGGAGTCTC
+GGCAGAGCAGCTGCTCAGGCATGTGTGGAGACCTTGGAGCCTTAGATACTTGGGCTTCCT
+GGCAAAAGTAGCTGCAACTCCAGCAAAGTGGGAGGTTAGACTCCTGTACATACCCCTAGG
+AAAGAGGCTGAATCCAGGGGGCTGAGCAGCAACAGTCTGCAGGCCCCACTTCCACGGCAC
+>L1PA15A
+CAAGATGACTGACTAGGCACACCCAGGAAGAGCTTCTCCCACTAAGACAGACCATCAAGA
+AGATTGGCACACTCTGAGCAGATCTTCAGAAGGAAGGCATTGAGAGTGGATGGAGGGAGG
+ATACAGAACCTGGGCTGAAGGGGGAGGAAGCTGGGAACCCTGCACAGGGTTGCCGAGCAC
+CAGGACTTGTTCCTGGCCCTAAGTGGCTCCTGAGGAAGGGATGAGTAAAATAGGCATGGA
+GTGGCCCACTCTCATCATGGACCTCTAGAATCCTAGCTGCAGGAGACTCCACAACCCACA
+TGGACATTTGAGCTGGCAGAGAGAGCTACCTGGAGAGTTGGCAGGGACAGGACTCCAGCC
+TGCATGGAGCCCAGAGGGTTTGGTATGGGAACAGCTGCAGTGGAGCATGACCAGGGATAC
+CCATTCCCCAAGGCTTACCATACTCCTCTAGGTGGCTTTAGCCTTTGTTAACTGTCAGAC
+CTGGACAGAACAGGGCTATCTTGCCTATGGGATGGGGCCAGTCTAATCTGAGCACCCCCC
+>L1PA15B
+CAAGATGGCCAACTAGATACAGCCAGGAGGAACATCTCCCACCAAGAGACCGGGACATCA
+AGAAGACTGGCACACTCCAAGCAGATCTTCAGAGAAAAGGCATTGAGAGTGGATAGAGGG
+AGGACACAGATGCTGAGCTGAAGGGGAAGGAAGCTGGGAACCCTGCACAGGGCTACAAAA
+CACCGGGACTCATTCCTGGCCCCCAGTGACTCCTGGGGAAAGGGTGAGTTGAACAGGTAA
+GGAGCAGCCCACTCTCACCATGGACCTCTGGAATCCTGGCAGCAGGAGACCCCACAACCC
+CCATGGACACTTGAGCTGGCAGGGAGAGCTGCTTAGAGAGGTGGTAGGAGCAGGACTCCA
+GCCTGTGTGGAGCCCAGAGGGTTTGGTGTGGGAACATCTGCAGTGGAGCACGGCCAGGGA
+CACCCATCCCCCAAGGCTCGCCATGCTCCTCTAGGAGACTTTAGCCTTGAGGAACTGTCA
+GACCTGGACACAGCAGGATGATCTTGCCTATGAAATGGGGCCAGTCCGACCTGAGCACCC
+>L1PA16
+TTTTTTCCAAGATGGCAGATTAGAGGCTTTTAGCATGCCTCAGCCACTTGGAAATAGCAA
+GATAGTACATAAAGATCAACTCTGTGAGCTTTAATTCAAGAAGGAAAATGGGAATCCACT
+AGAATCATGAAGGACACCCCAGATCCTAGGGAGGAGAATGTGGGCAAACAGCCCCCGTGA
+TGGTGTCTAGCTGATAAAAGTGAGTGAAGCCCCAGTACATGAGAGAGGCAGAGAGCCTCC
+CTCTGTGACTCACCTTTCCACTGGGGATCTGAGCAACCCAGGCCAAGGGAGAGCACTTTG
+TTTCTCCCAAGCCCTGGAGCTAACTTGGGGAGAGGCTTGGAGATGCTGTGAGGGAAAGAC
+ACCAGGAAAAGCTGCAGGCATTTTCCCAGACCCAGGACTGAGAGCAGGATGCCATTTTTA
+ATCTAGGCACATACAAAGTCAGCCATTCTTTGGTAACCCAGCAGCATGGCCATGCAGGCA
+TTTTAGTCTTGGGCCAAAGATTGGAGGACCTGCTCTGGAGTGGGGTAGGGGCCTCCACAA
Binary file test-data/est-small.fa.gz has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/genome.fa	Tue Feb 11 09:28:56 2020 -0500
@@ -0,0 +1,336 @@
+>chr17:13850000-13860000
+TGCTAAAGCTTCAATGCAGTAGACCAGAGTAGAAAGCTGTAGATGAGGTGATAGTAAATT
+CATTTGAGTCAACTCTCCTGACTTCTCTTTCATAATATAAACACATAATTTTCCCTTGTA
+TCCTTACAAAAGAGAGACTTCAATATCCATAAACATGTATTTCTATTTTGAGGTTACAGA
+CATAAAATTTAAAAATTCAACAGTTCTCAACCATTTCCTTTAGCAATCGCCCATACATAG
+ACTATGATGGAAATTAACTAGCAATGCATGAAATTTCTAAAGGAGCTCCTTATGATATCT
+CTCTAAAAAAATTTTAAAAGGAGCTATAAAGTTGTTAAACAGATTTATGGTAGTTTTAAT
+GTATCTACTAAAATGTTGGATTCATGTCGGCTTTTGTATTAAGGAAAAATGATTTCCTAA
+TAACCCCTTATAAAAGTAATTGCTGATTCTAAAGCCGTTATCTTTAAAAATGCTAATATA
+GTTTTCTTAGTAAAGCTTCTAAGCAATACTCAGTATGCCTTTCTCATTTTACATATATTC
+CTGACACTGATAAATATCAACATATTTTATTTTTGTTTTGCAATTTCtttttataaagac
+aatttttaacgagcagtttcaggttcatagcaacattgagtggaaggtacggagatagcc
+catatgctcacttcctcaacacatacgcagctcctccagtaaggacataccccatcagag
+tggtacattctatacaattgatggacttaacattgatacgtcattgtcacccagagtcca
+taatttacattaaggttgcctcttggtattgtatattctgtgggtttggacaaataaata
+atggcatcaaccaatcattgtacaaagtagtttcTTTTTCTTTTACATAATTTGTAATAT
+TTATTAATAAATAAGGAGTTATATATAATCAATTCACcgatggcacttttatcacagact
+aaattcttattaagttgttctgcctcgggcctttctgttttgttgcattaatgggtctaa
+cgatccataaaacagtaccacactttgaattcttaaaatttaaaatatatctttaaatct
+gCCCAAGAAAATGCTTCTTCCTTTCTGTGCTCCACACCTGCTCTACTGCTGGAGTCATTG
+CTGCCACCGTTACctgattctcctctctttgagaaagaagtaagattcacaaccaaatcc
+ctttggttggggagtgccatatgacttgttctggccatacctcatgaactcagtgacgtg
+ctatttccaggccacagtacttaatgatcagtttgagaccctctaaagatctcttttatc
+tgctgcagtacctgccaacctctgagctggaggctgctacttcagctcgaattcatagta
+aggaaacaaaaagacatcaacctgcaatgaacacagcatcagaaataaagctttgttatt
+ttaagtcattgagctgggcagagaaggaaagcgttgttactgcgtcctaactgagttgat
+tccgactaatacaCAGCAAAATAATTGATGTTTTCAAAAACTGCCCCaaatctcattagg
+attttgattagaattgtattaatcctgaagattcattttggaggagctagcattttcaca
+atattgaatcttcccgtgtccaagaatgtgatatgactcctcactcatgtctcttattct
+gaataaggttgtatatatttcataaagTTTACACTAAGAGCTAGGCATGTATTGCTATTT
+CTTATTTATGTTTGTTCCCATACTATAAGGATTTTTAATtattctgcaactggacatgct
+ggtgaattttcttaatagttctaatagctttggattgagcttgttgttccctaagtcaaa
+agtaaatggtgctgaataatggtaattttatgtatttctttctgctaatgaatgcctcat
+ttctatttcatatcttactgttttagatggaaattccagaataaggttgaTAATATCTTT
+GAATAAGGATATTTTTCTCTCCTTTATcagaggtcagaaagctttttctgtaaaaagtca
+gattgtaaatatttttagctttgagaaccagaccatctgtcacagctactcaatactgcc
+atggtagcataaaagcagccacaaccaacaaataaaaaaatgaacgtagctgGATTTGAC
+TGATAAACATGGTTTACTGAACCTTTTTCTACTTTAATGGCAAGGCTTTTAATGTTTTGC
+CATTACTATGATTTTAGTTACTAATTTATTATTTTAAGAAATTATTCCTCCAATTCTACA
+TTGCAAAATTTTTCTCTTTTTTGATAATTCATTTTTGACTTCAATCAAGATCATTGTTTT
+AAAAATCTGTTACATAGTAATTAAATTAATAGATGCTAAATTTCTCTAGAATGTTCTACA
+AATTTTCTAGTATTAAACCACTCTTACATCCCTATATGAGTTTTACTTAGttttattttt
+gtttttgttttgtttgagatggagtctcactctgcagcccaggctggagtgcagtggcac
+aaccttggctcactgcaacctccgcctcccaggttcaagcgattctcttgcttcagcctc
+ctgagtagctgggattgcaggcacctgccacgacactcagctaatttttttgtattttta
+gtagggatggggtttcaccatgttggccaggctggtcacgaactcctgacctcaggtgat
+ccacccgccttggcctcccagagtgctgggattacaggtgtgaaccactgcacccagccA
+GCCATTTTTATTTATTCCTGGATtttattaaacaaaccttaattggatgctcatgatgta
+tcaggcacacttgtagaagtaatggatgcagcagtcaacaaaatagaaaaaagttcctgc
+tctcatggagctgacattctagtgggaggacaaagataataataaattcacttaaatatg
+tcaggtgaaggataagaaagcaaagacaaagagtgtcagggtagggtgccattttagaaa
+tgaggttcaggaaggcctttctgatcaggtgacatttgagcagaaacttgaaggaagtga
+gggcacagtctaataaattaaataagcaactggaagtagtacactaaattgccaggatag
+agaataagcaggatgctagaggggcacatggcaggatcgcctaatgtggtcacagacgtg
+gggtgaggagggcttctgggaggaagcaacgtttattctgagaccttgaagaaAAGTTAC
+ACCTGtgtgatggttaattttatgtgtcaacttgaccaggccatggggtgcccagacatt
+tggtcaaacattattctgggtgtatctgtgaaggtgtttctggatgagatgaatatttgc
+attcataggttgagtaaagcaggttgccctttcttacatgggtgtgcctcatccaatcca
+ctgacgatctgaatagaacaaaaagactgagtaagagggaattcttcttgcctgactgct
+tgagctggggtatcagtcttttcctgtctttgaatttgaactgaaactttggttctcctg
+gttctcaggcctttgaactggtcctacaactacaacatcagctttcctgggcctctacct
+tgccaactacagattttgggacttctcagcatctatgatcgtatgacctgatttcttata
+aatctctttatatgtatacacatgcacacacacacacacacacacacacaaccctattgg
+ttctattgctctaaagaaccctgactaattcaATGAGCAGGAGAAAAAATAATATTCTAT
+AATAGCATAATTTATAGTCCCCAAATTAGAGGAAAAGAACAGTTTCAAGCAAATGAAAGT
+TCAATATAGAGGAAGAGAAGAAATGAGGTAAAGAGTGGGGCTGAACAGATGGGAAGAAAT
+CGGGTTGTTCACGATCCTGAAAACCTTCCTGAGCATGCGCTGTGTCCTGTGAGCAGTGGG
+AAGCCATTGTGTGTTTTAAGTAGCAAAGTTAAGTAACCAGTGGGGCCACCAGGTATCACA
+GCCCCAGTGGTCACCACCCCATTATATCCACCCATAGAATACATGGGCTAGTGCCCATGG
+AGTTCAGTCGTATAGAGACATTGAACTGTGTTTTATCATATACTGGGCCACAAGGAAAAT
+TTAGATGGACTTTATAAATAAGAAATTGTTCATGCTACATTCTCTGGATTAAAGCAAAAA
+GAAATTATAATATAATAAAAGGGTAGTCAAAATATATATATAAAGCCACtgtagagtagg
+aaagatactgttctacccatcatgatcaaggaccctataacaaaagacagattaacagag
+agaagcataaaaaagatatttaatatagatttaacatgacatagaagtcttcacaagaaa
+atgaagatccaaagaaacaggtacacttgagtagctttgtgctggttttgatgaagactt
+gagagtggaggggaaacgtaataaagcagaaagggtgtgatctaatggtaataaactgag
+ggaacttagcagggcctatttgttcagattcttctctgtgaccctgtgtcctcagggata
+aggatgctcatccattcagaggtatagggagggcacctctcacatgagggttttgtgacc
+tggttcaggggaaggtcagaaaatccttcccggttgtatgacctgcttccggggagaatg
+atgtgggaaggtcagtgagaccttcctgattctgccgttattataaattccttcagcttg
+atatattcaataggccaaaatgccctattttggggtagtgtgtcctgaacACATATAGGA
+AAATTTTTAAATTCTTCTGTAAAATAAGTCTTGGGCCAATAAGTACATGAAACCTGCAGC
+TATCAACTTTATGGACATTAAAAACAAATTAAAAACTTGGAGAGAAAATGATCACAGCAA
+TTCAAAGACCAAAAAAATCATAGGCTTGAGGCTTAAATGAGAAAGACTGGCTTAAATGAG
+AAAAGTCAAGGAGAAAAATGACCCAAAGGATAAagggcctctgtgtttgttgtgctctcc
+acccatctttatgcctgttgccctcactttcttcaagtccctgcccaaattccacctgat
+cagagaggctttccctttagcccctttctaagatagcatcctttccctctgctatccgtc
+actctctacctctgctttattatccttcccctggcacattctgtgtgtctttgctatcat
+ctgagtcctccccctggaataaagctgtgagcgcagggacctctgtctattttgtcccct
+gcggcatcccctacttctagaacagtgcctggtacTGGGgctccatgtggcaggtctgtg
+actggcctgttcaaacttcatcccctacccaggccaggcatttgccagatgcttaataaa
+tactttttgagttaatgCTACAATGCATCACTGGACATCTTTTAAAAGTAATATTCTTTT
+GGAGGTATCAAATCTATCTAAAAATATATAGGGATCgttccaagatggccgaataggaag
+agcttcattctgcagctcccagcatgatcgatgcagaagacaggtgatttctgcatttcc
+aactgaggtgcctggttcatctcactgggactggttggacagtgggtagcccatggaggg
+tgagctgaagcagggtggggtgttgcctcgcccaggaagtgcaaggggttggggggtttc
+cctttcctagccaagggaagccatgacagactgtacctggaaaatcgggacactcccacc
+ctaatactgcatttttccagtggtcgtagcaaatggctcacctggagattatatcccatg
+cctggctcagtgggtcccatgcccacagatccttgctcactgctagcacagcagtctgag
+atcaaactgcaatgtggcagcctgggctggaggaggggcatccaccattgctgaggcttg
+agtatgtaaacaaagcagccaggaagctcgaactgggtggagcccactacagctcaatga
+ggcctgcctgcctaccactgtagattccacctctgggagcagggcatagctgaacaaaag
+gcagcagaaatttctgcagacttaaacgtccctgtctgacagctctgaagagagaagtgg
+ttctcccagcatggggtttgagctctgagaacagacagactgcctcctcaagtgggtccc
+tgacccccgtgtagcctaactgggagacacctcccagtaggggccgactgacacctcata
+cagccaggtgcccctctgagacgaagcttccagaggaaggatcaggcagcaatatttgct
+gttctgcagcctccgtgggtgatacccaggcaaacagggtctggagtggacctccagcaa
+actccaacagacctgcagctgagggtcctgactattagaaagaaaactaacaaacagaaa
+ggaatagcatcaacatcaacaaaaaggacatccacaccaaaaccccatctgtaggtcacc
+atcatcaaagaccaaaggtagataaaaccacaaagatgagaagaaacctgagcagaaaag
+ctgaaaattctaaaaaccagagcacctcttctcctacaaaggatcacagctcctcgccag
+caatggaacaaagctggatggagagtgactttcacaagttgacagaagtaggcttcagaa
+ggtcagtaataacaaacttctccgagctaaaggaggatgttcgaacccatcgcaaagaag
+ctaaaaaccttgaaaaaagattagatgaatggctaactagaataaacagtgtagagaaga
+ccttaaatgacctgatggagctgaaaaccatggcacaagaactacgtgacgcatgcacaa
+gcttcagtagccgattcgatcaagtggaagaaagggtatcagtgattgaagatccaatga
+acgaaataaagcaagaagagaaatttagagaaaaaagagtagaaagaaatgaactaagcc
+tccaagaaatatgggactatgtgaaaagaccatctatgtttgattggtgtacctgaaagc
+gacggggaaaatggaaccaagttggaaaacactcttcaggatattatccaggagaacttc
+cccaacctagcaaggcaggcagacattcaaattcaggaaatacagagaacaccacaaaga
+tactccttgagaagatcaacctcaagacacataattgtcagattcaccaaggttgaaatg
+aaggaagaaattttaagggcagccagaaagaaaggtcgggttacccacaaagggaagccc
+atcagactaacagtggatctcttggcagaaaccctacaagccagaagagagtgggggcca
+atattcaacattcttaaagaaaagaattttcaacccagaatttcatatccagctaaacta
+agcttcataagtgaaggaaaaataaaatcctttacagacaagcaaatgctgagagatttt
+gtcaccaccaggcctgccttacaagagttcctgaaggaagcactgaacatggaaaggaac
+aactggtaccagccactgcaaaaacatgccaaattgtaaagaccatcaatgctaggaaga
+aactgcatcaactaacgagcacaataaccagctgacatcataatgacaggatcaaattca
+cacataacaatatctaccttaaatgtaaatgagctaaatgccccaattaaaagacacaga
+ctggcaaattggataaagagtcgagacacatcagtgtgctgtattcaggagacccatctc
+acatgcagagacacacataagctcaaaataaagggatggaggaagatctaccaagcaaat
+ggaaaacaaaaaaaaagcaagggttgcaatcctagtctctgataaaacagactttaaaca
+aacaaatatgaaaagagacaaagaaggccattacataatggtaaagggatcaattcaaca
+agaagacctaactatcctaaatatatatgcatccaatacaagagcacccagattcataag
+gcaagtcctgagagacctacaaagagacttagactcccacacaataataatgggatactt
+taacacccccctgtcaatattagacagatcaatgagacagatggttaataaggatatcca
+ggacttgaactcagctctgcacgaagcagacctaatagacatctacagaactctcccccc
+caaatcaacaaaatacacatttttctcagcaccacatcgcacttattccaaaattgacca
+catagttggaagtaaagcactcctcagcaaatgtaaaagaacagaaatcacaacaaactg
+tctctcagaccacagtgcaatcaaattagaactcaggattaagaaactcactcaaaacca
+cacaactacatggaaactgaacaacctgctcctgaacgactactgggtaaataacgaaat
+gaaggcagaaataaagatgttctttgaaaccaatgagaacaaagacacaacatatcagaa
+tctctgggacacatttaagcagtgtgtagagggaaatttatagcactaaatgcccgcaag
+agaaagcaggaaagatctaacatcagcaccctaacatcacaattaaaagaactagagaag
+caacagtaaacaaattcaaaagctagcagaaggcaagaaataactaagatcagagcagaa
+ctgaaggagatagagacacaaaaaacccttcaaaaaatcaatgcatctaggagctggttt
+tttgaaaagatcaacaaaataaatagaatctaatagaaacaataaaaaatgataaagggg
+atatcaccactgatcccacagaaatacaaactaccatcagagaatactataaacacctct
+atgcaaataaactagaaaatctagaagaaatggataaattcctggacacatacaccctcc
+caagactaaaccaggaagaagttgaatccctgaatagaccaataacagactctgaaattg
+aggcaataattaatagcctaccaaccaaaaaagcccaggacaagaccaattcacagtcaa
+attctaccagaggtacaaagaggagctgacaccattccttctgaaactattccaatcaat
+agaaaaagagggaatcctccctaactcattttatgagttatgaggccagcatcatcctga
+taccaaagcctggcagagacacaacaaaaaaagagaattttagaccaatatccctgatga
+acattggtgcaaatatcctcaataaaatactggcaaactgaatccagcagcacctcaaaa
+agcttatccaccacgatcaagttggctacatccctgggatgcaagcctggttcaacattc
+gcaaaacaataaatgtaatccatcacgtaaacaaaatcaaagacaaaaaccacatgatta
+tctcaatagatgcaaaaaaggcctttgacaaaattcaacagcccttcatgctaaaaactc
+tcaataaactattttgatgggatgtatctcaaaatactaagagctattttttgacaaacc
+cacagccaatatcatactgaatgggcaaaaactcctttgaaaactggcacaagacaggga
+cgccctctctcaccactcctattcaacatagagttggaagttctggacagggcaatcagg
+cgggagaaagaaataaagggcattcaattaggaaaagaggaagtcaaattgtccctgttt
+gcagatgacatgattgcatatttagaaaaccccatcatatcagcccaaaatctccttaag
+ctgataagcaactttggcaaagtctcaggatacaaaatcaatgtgcaaaaatcacaagca
+ttcttatacaccaataacaaggcaaacagagagccaaatcatgagtgaactcccactcac
+aattgcttcaaagagaataaaatacctaggaatccaacttacaagggatgtgaaggacct
+cttcaaggagaacaacaaaccactgctcaacaaaaaaaaagaggacacaaacaaatggaa
+gaacattccatgctcatggataggaagagtctatatcataa
+>chr18:62900000-62910000
+TAAAAAGTTTGTCTGggccaggtgcagtggctcctgcctgtaatctcagcactttgggag
+gccgaggcaggtggatcacctgaggtcaggagttcaagaccagcctggccaacatggcaa
+aaccccgcctctactaaaaatgcaaaaattagctggctgtggtggcatgttcctgtagtc
+ccaactactcggtaggctaaggcaggagacttgtttgaacccaggaggcggaggttgcag
+tgggccaagatcgcaccactgcactccaacctgggtgacagagcaagactttgccttaaa
+ataataaataaataaataaataaataaataaataaataaataaataaataaaAAGTTTGT
+CCTAGTTACATCATGGTGACTGTGGTCAACAATATGTTGTAGTTGTTTGTAttcttgttt
+tttctttttctttcttttttttttttttttttttttttttttgagacagggtctcacttt
+gttacccaagctggaatgcaatcacagcttgttacccaagctgtggtgcaatcacagttc
+actgcagcctcaaactcctgggttcgagtgatcttcctgccccagcctctcaaatagctg
+ggagtataggcacgtgccaccatggctggctaattttttattttttgtagagatggggtc
+ttgctctgttgcccagtctggtctcaaacgaaccttctacttcagcctcccaaagtggta
+ggattacagagtttgagctaccacaccctgccataatatattgtattcttgaacaatgct
+aagagagtggatgtattttcaccacaaaagtgaaatatctcacaaataactatgtgagat
+agtgcatgtgaactagctagaattagtcacttcacagtttacgtatatttcaaaagtcat
+gctgtacacaataaatatgtacagttttatctgtcaattaaacaaaTAATAAAACGGTTC
+ATCCTAAGTAGCTGAATTACTGTGTGAACCTGAAAACTTGGTATTTCAGTCATGGTGAGA
+GTTAACAACTTAAGCCAAATGTTAGCTTTCTTTTTTGTTACATTAACTTTGCTTTTGTTA
+TAGATTTTTTTGTCTCCTTATTAATTCAATGCTTATTATTTTAGTACTAATACAATTTCA
+TTGTATTGAATGAAATTGTGTGTGGCTCTTTCAAGTGAAGATGATAAAGCCATTATGAAG
+GTTATTTGAAGTGTAGATTGGGAAGAAGATGGGACATTTGTTCCATTCCTGCAGTCTGTT
+GTACCCAAGATGAGATGTGTTTTTTCTTTTTTATTCTGTTTACACATTCTAGTAATCTAG
+TGAGCATTTGGAAATAAGCAGATTGCTGGGTCAAGGCCAGTTTTTAAATCTTACAACCTG
+GAATAAAAAAAGAGAAAGAGCCAAAAAAACATCCTCTTAGGGCCATTGGAAAAGGCCATA
+TGCTGTGCTTGCGTGTTGACAAATCCCAGCTCTTTGCTGGAACTCATCCTTGTGTTTCAG
+TGGCTTTAGGATATTATTCTTAATTCATTTTCCATAGGTTTATTTTATTTTTTTAAAGGA
+CAGAAATTCACTATAGAGAAACTCTAGCTTTTTCCTGTACTCTAGACTTATATTAATACT
+CCttttttctttttttttttttgagatggagtctcgctctgtcgcccaggctagagtgca
+atggcgtgatcttggctcaccacaacctccacctcctgggtttaagcagttctcctgcct
+cagcttcccgagtagctgggattacaggcgtgtgccaccatgcccagctaattttttgta
+ttttttttttagtagagatggggtttcaccatgctggccaggctggtctcgaactcctga
+cctcgtgaaacacccacctcagcctcccaaagtgctgggattacaggtgtgagccatcgc
+acccATCCTATATTAATACTTTTCTAAACAAGTGCATCATCTCAGCACTTTGCTGGCTTT
+GTAATGGAAAATAGATGGTTTTTGTTGTTTGTTTTTAAAGGAGTTAGACATAGCCTAACA
+AACTGGAAATTGACATTTCCATCTATTTTTCTCCCTTTTGAAGCTAAATATGTCTTTGTT
+ATTTTGGTTCCTAGTCCCCATTACTACTTATTTTCTGATAGTTCATCCACAGCAACTTCA
+GTCAGTTAGCTCACTAGTTCTTATGGCTAGAGATTCCGCCAGTTTTCCCCTGTGCCTTGC
+TTCATCACAGAGGTGTTGGTTCCCATTTTTGTCCGGCATTCTAAGATTTCTCAATGGATT
+CTAGATGCCGGATTTCAGTATTTTCTGCACTTCACTCTATCAAGCAGTATTTTATAGACA
+GAGATAGTTTTGGTGGTTCATCCTGGTCCTGAGCAGTTGGGAGTCATGTACTTGCATTCC
+CATCTCTGGTGCTCCCATTCAGTGTGCAACTCTTATTCGTTGTGTGACTCCCGTCCATTA
+CTGTTTTTCCACCTCAACCTTTAATTCCATGCTACTCATCCGCCTGTTCATGCATCCTCT
+CTCCTTCATTAAATATTCGTTGTAGTTGTGATGTGCCTAACAGTTGTTCTGAGTTTTGTT
+TCTTATGTTCTTTTCGGTATGGTGTAGATAGTTTCACAGTTCCTTGGATGTCAGTTCCTA
+GTTCTTTGGAAGTCAGTGCTTAAGTGGAATTTTTTTCCCTCTTGAAGTGAATTAAGGTAA
+AGTCAATGTGCTTATTCCTCTCCCAGCTGTAGTGGTGTCACTTGTGTTTCAGAATATATT
+GTGAAGGTTAAAACCTCCTGGAATTATAGCTAAAAATAGATACTCTGGCTAGTTAAGAAA
+GGCCGGATGCTGAGATTCCAAAAATCATGGAGAACTATAATACAGAGAGAACTGAGTTCT
+TTCTCGCTATTTCTCATATTAGGGTGTGCCCATTTACTTATAGCATTGCAGTTAATTATA
+GTCTCTATGTCCTTTGCCCTCAAGGTTGAACGTAATTAGGAAGCTGATAGCAGATGAAGT
+GGACTTTCTACAGCATGTTACTCAGCTTGACCTACGAGACAATAAGCTTGGTGATCTAGA
+TGCTATGATTTTCAACAACATTGAAGTTTTACACTGTGAAAGGAATCAACTGGTCACATT
+AGACATCTGTGGCTATTTCCTAAAAGCGCTCTATGCCTCTTCTAATGGTATGTATCATAG
+GCTACATCAAAGTTGCTCTTTTGGTTCCAGGAATTTACCCAGCATCATTATTTCTGCTTC
+TGATTATTCTTTGCTCAAGTAGTTAGTAAAATAGCTCAAATTTTGCTAAAATAAAAGTCA
+CAAAAGAAAAATGCTGACTTATTGTTTAAAGGACTCAAAAAGGAAAATTTTATTGTCCCT
+AATTTTTTTCTCGTATTGTGATTTGGATAAGTTACTCCCACTTTTGATTTGATTTTTCTG
+CTTAAAGGAAGAGAGAAAAGTGAACTATTTCTTGGGCTACATTACCAAGATCTAGAGATC
+TTTACTACCTTATTACTAAATCTGGAACCTTTATTTAATACTGGAGAATGAAAGGAAGTT
+TTATTTTGACTCCATTCGGGATCTCCAGTTTCATGTTTGACTAACAAAGAACTCACCTTA
+ATATAAACCAGAATGttagctgggcgtggtggtgtatgcctgtagtcccagctacttggg
+aatgggaagctgaggcaggaggattgctggagcccaggaggtggaggctgcggtcgtctg
+agatcacactactgcactccagcctggttgacagagcgagaccctgtctcaaaaaaaaaa
+aaaagacaagaaaaGATAATTTAAAAAAGATAAACTAGAATGATATATGCACAAGAAGGA
+CACCATGAAGCTAGAGTCTTAATCATTTAATAATATTTCTTCCTAAGAATCTGAAAATCA
+GGGCAGTTCCAAAAAAGAAAAGGTAGTATGGGCATATGTTTGCTAAGATGAAGGTTTCCA
+TTCCCTACAGTCAGTAAACTGAATGAAAACAAGTGTTCACTACTGCAAGTTGAACATATG
+TTTATCACGCACTTGTTTTATGCATAGTGCAGCTCATGAGCTCTGAAAGATGAAGGATTT
+TTCAAATGTGATTACTGTTATCTCAGAAAAACAAGCCAAGCCTCAAATAGGTATATTTTC
+TAGTGTAATCAGTTTGGCTGAGCACTGAAGGGTTATAGGATTTAGATAACCAGTGGGAAT
+GAAGTAGGAAGAAAGAATCTGAATGTGGCTTGTTCGGCAGTTGGGAGAAAACAGGGAATT
+CTGAACCCATAGAAGTAATTAGGGGATGCATGCTTTTGTCAGATGGTCAAGCATTGCCCT
+TAGCTTAGTAAGCGATAGAGAACCAGTAGAGACTCTAAAGTGGAGGAGACTTGATGGAAG
+TGATGCTTTAAGGCAGTTAATGTGAAAATAGTGTGTACAGAATGCATTTATAGAAGAAGG
+TTGAGGGTAATCCACTACTCCACTAATCCAAGTTATTGTGATGGGCTTCATGTGGGTTAA
+TGGGAACTTGTAGTCAAGATTACATATGTTGATTTGAGACTTACCTGCTCAGAGGTGATA
+CCTGAAACCAGGGAAGTAAGGTAACTGGAAGAGAGGAGAGTGCTAGTACCAAAGGTCAAC
+TTACAAGCCCCTCACACTTAGCTGCAGCCAGACTGGGCAACCAGATAGGAGCTGCACCTG
+TGAATTACTTGGTAATTGTTTAGAGAAGCAGAAGGACATTTACAAACTACTCTTGTCCAA
+GAAACACAGTGACAGGGGACAGTGGTGTCATATTTCATAAAGTGTTCAGGAAGTGTTTCA
+gatttaagtaaaataagtcatttgtgacccactggagtgctgtttcagtaaggtgatgag
+ggcaaaagACAAGAAGCATTACTTGGTTTTATGGAAGGACCCTTGGGTTTTAAAAGGATG
+GTACTCGTGGTTAATCTTTCAGATGTGATACAGCCTGCATAACAATAAGAGCAACAGTAA
+ATGGATAGCAAAGAGGTAGGAAATTAGAATGCATGATGTATTTCAATCTCTGAAGAAGAT
+CTTGTGATTAAAAGTTCTTTTTTACTTTTCCTGCACTTTCAAAGTTAAACAAATGATGTA
+TTGTACTTCCTAAACTAAACAAACAATAGAGAATAAAGCACAGTAATGACGTTCCACATA
+CAAAAAGAGTCTCTATGTCATTTGTATAGTAATGTCTTTGTGGGGTTTTTTTTTTTCTTC
+CTAGAACTTGTTCAACTTGATGTTTACCCAGTTCCAAATTATCTGTCCTACATGGATGTT
+TCAAGGTAAGAAGTCAAGTCTTAGAGCCCTCTAGAGTCTACTAGAAAATTATTTAGTAAT
+TCTGTCTGAGCTTATGCACAAGTACTTTTTAATATTTTGAAGGTAAATGCTAAAAAATTA
+ATGATTTTTACTTTATTCTCTAAAATTATATATATCTATTGATTAAAATACATTTGTAGT
+TCAAACCAGAGCATCAAAGTGCCTGTGCACACCAATTTGAACACACATTTGGACTTGAAA
+GGTGAGTAAGTTGAGGGCCATATGGCTTAAAGCTCTAATAACTCTTTTCATTATATGAAT
+CATATTTTTTTGTCTTTCCCTGAAGTAATGTTAATTTTATTTTTTATTTTCAAAATTTTT
+TTTCAAACTCTGCCAAGTCTTAGGATGATTTAATTTTTTAAGTGCTTTATTTCTTTGGAT
+TTCTTACACCCCTTGTTTAGACATATATCTCTTCGCTAAAAATTCTTAGGAAATAATGAC
+AAAGCCTATCAAAATAGAAATTCTCTACAACCTGCTTGGTTTTCTTAGCTCCTTTTTGAA
+TATGCTAACTATTTTACCTTTTATGGTAATTTGCTTCTGCAGTGTATTATATTTATTGCG
+GTTCCCACAAATATTATAGTAGACTTTTTCTTGAAGGCACAAAGGCTTGACAGTGTCTAC
+AGTATGTATTTATACCACGTAAACTTAAAAATTTTTAACAATGAATTTTAAAATTGCaac
+tcatttggaaggtaactccaaaggagatacacaaaaatgttctaaacatagggagtttgt
+ggcccactcaaggtgacaactgttaactcatttcagggcttaaattctggtgtgtttatt
+aacagtcaccatgctttttaatcacaactATTGTATGATTTGTCTTCTACAGAATTTTGC
+CTTTTATCTTGAGATTACACAGGCTTAGCTATTTTAATAATCTATTCAATCATAATTATG
+CAAGATGTGTCAGTACTTAGCTATTGGGAAAATATTACAGTTAAATTTTTATTgggggag
+gagccaagatggccgaataggaacagctccggtctacagctcccagcgtgagcgacgcag
+aagacgggtgatttctgcatttccatctgaggtaccgggttcatctcactagggagtgcc
+agacagtgggcgcaggccagtgtgtgtgtgcaccatgcgcgagccgaagcagggcgaggc
+attgcctcacctgggaagcgcaaggggtcagggagttccctttccgagtcaaagaaaggg
+gtgacggacgcacctggaaaatcgggtcactcccacccgaatattgcgcttttcagaccg
+gcttaagaaacggcgcaccacgagactatatcccacacctggctcagagggtcctacgcc
+cacggaatctcgctgattgctagcacagcagtctgagatcaaactgcaaggcggcaacga
+ggctgggggaggggcgcccgccattgcccaggcttgcttaggtaaacaaagcagccggga
+agctcgaactgggtggagcccaccacagctcaaggaggcctgcctgcctctgtaggctcc
+acctctgggggcagggcacagacaaacaaaaagacagcagtaacctctgcagacttaagt
+gtccctgtctgacagctttgaagagagcagtggttctcccagcacgcagctggagatctg
+agaacgggcagactgcctcctcaagtgggtccctgacacctgacccccgagcagcctaac
+tgggaggcaccccccagcaggggcacactgacacctcacacggcagggtattccaacaga
+cctgcagctgagggtcctgtctgttagaaggaaaactaacaaccagaaaggacatctaca
+ccgaaaacccatctgtacatcaccatcatcaaagaccaaaagtagataaaaccacaaaga
+tggggaaaaaacagaacagaaaaactggaaactctaaaacgcagagcgcctctcctcctc
+caaaggaacgcagttcctcaccagcaacagaacaaagctggatggagaatgattttgacg
+agctgagagaagaaggcttcagacgatcaaattactctgagctacgggaggacattcaaa
+ccaaaggcaaagaagttgaaaactttgaaaaaaatttagaagaatgtataactagaataa
+ccaatacagagaagtgcttaaaggagctgatggagctgaaaaccaaggctcgagaactac
+gtgaagaatgcagaagcctcaggagccgatgcgatcaactggaagaaagggtatcagcaa
+tggaagatgaaatgaagcgagaagggaagtttagagaaaaaagaataaaaagaaatgagc
+aaagcctccaagaaatatgggactatgtgaaaagaccaaatctacgtctgattggtgtac
+ctgaaagtgatgtggagaatggaaccaagttggaaaacactctgcaggatattatccagg
+agaacttccccaatctagcaaggcaggccaacgttcagattcaggaaatacagagaacgc
+cacaaagatactcctcgagaagagcaactccaagacacataattgtcagattcaccaaag
+ttgaaatgaaggaaaaaatgttaagggcagccagagagaaaggtcgggttaccctcaaag
+gaaagcccatcagactaacagcggatctctcggcagaaaccctacaagccagaagagagt
+gggggccaatattcaacattcttaaagaaaagaattttcaaaccagaatttcatatccag
+ccaaactaagcttcataagtgaaggagaaataaaatactttatagacaagcaaatgctga
+gagattttgtcaccaccaggcctgccctaaaagagctcctgaaggaagcgctaaacatgg
+aaaggaacaaccggtaccagccgctgcaaaatcatgccaaaatgtaaagaccatcgagac
+taggaagaaactgcatcaactaatgagcaaaatcaccagctaacatcataatgacaggat
+caaattcacacataacaatattaactttaaatgtaaatggactaaattctgcaattaaaa
+gacacagactggcaagttggataaagagtcaagacccatcagtgtgctgtattcaggaaa
+cccatctcacgtgcagagacacacataggctcaaaataaaaggatggaggaagatctacc
+aagccaatggaaaacaaaaaaaggcaggggttgcaatcctagtctctgataaaacagact
+ttaaaccaacaaagatcaaaagagacaaagaaggccattacataatggtaaagggatcaa
+tccaacaagaggagctaactatcctaaatatttatgcacccaatacaggagcacccagat
+tcataaagcaagtcctgagtgacctacaaagagacttagactcccacacattaataatgg
+gagactttaacaccccactgtcaacattagacagatcaatgagacagaaagtcaacaagg
+atacccaggaattgaactcagctctgcaccaagcagacctaatagacatctacagaactc
+tccaccccaaatcaacagaatatacatttttttcagcaccacaccacacctattccaaaa
+ttgaccacatagttggaagtaaagctctcctcagcaaatgtaaaagaacagaaattataa
+caaactatctctcagaccacagtgcaatcaaactagaactcaggattaagaatctcactc
+aaagccgctcaactacatggaaactgaacaacctgctcctgaatgactactgggtacgta
+acgaaatgaaggcagaaataaagatgttctttgaaaccaacgagaacaaagacaccacat
+accagaatctctgggacgcattcaaagcagtgtgtagagggaaatttatagcactaaatg
+cctacaagagaaagcaggaaagatccaaaattgacaccctaacatcacaattaaaagaac
+tagaaaagcaagagcaaacacattcaaaagctagcagaaggcaagaaataactaaaatca
+gagcagaactgaaggaaatagagacacaaaaaacccttcaaaaaatcaatgaatccagga
+gctggttttttgaaaggatcaacaaaattgatagaccgctagcaagactaataaagaaaa
+aaagagagaagaatcaaatagacacaataaaaaatgataaaggggatatcaccaccgatc
+ccacagaaatacaaactaccatcagagaatactacaaacacctctacgcaaataaactag
+aaaagctagaagaaatggatacattcctcgacacatacactctcccaagactaaaccagg
+aagaagttgaatctctgaatagaccaataacaggctctgaaattgtggcaataatcaata
+gtttaccaaccaaaaagagtccaggaccagatggattcacagccgaattctaccagaggt
+acaaggaggaactggtaccattccttctgaaactattccaatcaatagaaaaagagggaa
+tcctccctaactcattttatgaggccagcatcattctgataccaaagccgggcagagaca
+caaccaaaaaagagaattttagaccaatatccttgatgaacattgacgcaaaaatcctca
+ataaaatactggcaaaccgaatccagcagcacatcaaaaagcttatccaccatgatcaag
+tgggcttcatccctgggatgcaaggctggttcaatatatgc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/one.fastq	Tue Feb 11 09:28:56 2020 -0500
@@ -0,0 +1,100 @@
+@HWI-ST584:365:C37MVACXX:1:1305:19372:56141 1:N:0:GCCAAT
+CTCGTATACCCTTGACCGAAGACCGGTCCTCCTCTATCGGGGATGGTCGTCCTCTTCGACCGAGCGCGCAGCTTCGGGAGGGACGCACATGGAGCGGTGAG
++
+CCCFFFFFHHHHHHJJIJJJIIIJJIJJIJJGGJJFJJHIJJGBHFCCBFDDDEDDDBABDDDDDDDDDDDDDDD@@B@BBB@BD@BDBDDDCDCBD@BDD
+@HWI-ST584:365:C37MVACXX:1:2301:7296:160148 1:N:0:GCCAAT
+CTGGGATATAAGACTCCTACCTCGGCCTCCTAATGAAGGCTGAGACGATTGGTACACAGCTCCAGCGTGGTGTCAGGCACACAACAGGTGCTCTCCCTAAG
++
+@CCFFFFFHGHHHJJJJIJIIIJIGGIJJJJJJJIIJJJJJJJJEGIJIJJJJIIIJJJIJJIIIHHCFF=BBCEDDCBDDDDDDDDD@CCDDDDDDDDDD
+@HWI-ST584:365:C37MVACXX:1:1205:13370:110105 1:N:0:GCCAAT
+CCTGAACTTAGGCTTGCTCTGCAGAAGAGGACCCAGACCGAAGCTGGATAACGCTGGTGCATGCCTCCCTGGCTCCCTTGGCTTTTTTTGGTCACAGGGCC
++
+@@?DADDDHHHFHGIBG<FHGI>FHGFEG?DGHDBC;6?GIHGG@FA@FGHG?HEHA?DDDCCCCCE?@C>;=?A88<@?CCCBCCC@B>BCCCCCCBC?B
+@HWI-ST584:365:C37MVACXX:1:2308:12673:6166 1:N:0:GCCAAT
+CATAAATGTGTGCACGAGTTACTTTATATGCATTATGAATTTGTTGAAAGAACAATTTCAAAACTGATGATTACCTCTGGCCTCATTCTCACATGCCACTA
++
+BCCFFFFFHHHHGJJJIIHIHIJJJJJGJJIIJJJJIJJJJJJJJJJIJJJJIJJJIJIJJGIJJJJJJJIJJJJCHIIHGHHHFFFFFFFEEEEDEDDDD
+@HWI-ST584:365:C37MVACXX:1:2207:7253:147412 1:N:0:GCCAAT
+NCTGTTTCCATCTGGGGGCCTCAGGAGTATCTGGGTTCTCCTCCAACAGCTCTGTCAATTTGTCTTTCAACTCCTGTACTTTGTTTACATTCTGCTTCAGT
++
+#1BDDFFFHHHHHJJJIJJJJJJJJJJFGIJJJJJGHIIJJIJJJJJIIJJJJJIJJJJJHHHHHHHFFFFFFEECEEEFFEDDDDDDDEEDEEDDDDDDF
+@HWI-ST584:365:C37MVACXX:1:2308:14918:56009 1:N:0:GCCAAT
+GCAGTCTTTGGAGAAGAAATATTCTAAACATTTAAGCAAGGAGGAGGCTTCCTAAACTGCATTTTTGTTTCTTATCTCACCATTTTTGTGGTGTGTTTCAC
++
+CCCFFFFFHHHHHIJJJJJIJJJJJJJJJIIJJJJJIJJJJIJIJJJJIJJJJJJJJJJHIIJJJJJJIJHHHHHHHFFFFFFEEEEDDDDCDDDDDDDED
+@HWI-ST584:365:C37MVACXX:1:1201:11510:45354 1:N:0:GCCAAT
+GTAGTTTTGAGAAATTTTCCACAATTGTCCTCTGAGCAACTACTATACTTCCAAATCTTACTTTCCCTCGGATTAAGAAATAGAGAATGCAGAGGATCTTG
++
+@@@FBDFFHDHHHGHGIIGIJJIJIJHHIIHGIEEHIJJJJIHIJJJIJIIGECGIIJEBGHIIJCGFHAB@EEEE=??CEED@@CEDDEEDDBBB;:CDD
+@HWI-ST584:365:C37MVACXX:1:2108:4159:38107 1:N:0:GCCAAT
+GTCAAAAAATAGGGTCAACTGTGTTAGACTAAATTACATTATTGTATATGCTGCACTGAATGGAACCTTTGTATTGTAATTATCATAGAGAAGCACAGTTT
++
+?::A???=DD?D<E+AB:FEDA4C@??E?@C>DDCCDE<?DDDDDEADEDEC<BDEBDCDEICACDDCACD=@CC=7?=:;CDA;@;ADAAAAAA??=A;>
+@HWI-ST584:365:C37MVACXX:1:1203:20582:36223 1:N:0:GCCAAT
+GCCACCTTTCATTTTCCTTGCATTGGACACACCTACAGGGCTTCGCTGCACCGACATCTGAGGCAACATCCCATCATGCAGCCAACTTAACTGCACTACCA
++
+@@@FDDEFGFDFFI>EHGEGGHGI@HEHHCGGGGEIHIFIHHEHBFHHDEIGIBGGBAHFFEB?BDA@ACCBCCC;>@ACCCBBCCCCCC@ACCCCC@?AC
+@HWI-ST584:365:C37MVACXX:1:1307:2892:120144 1:N:0:GCCAAT
+GGCTGCTGTTTGAGGTTTATTTTGTTCTTATTCTTTGGAAGATATTCCTTAAGGCTTCCCGAAGGCAGAAATTCCATGATGAGCTTAATACCATTTCCTCC
++
+?@@DDDDFHHHHFGHBHGIIIIJJIIGGGEHIEGGIJIEEFGGIHGIIJJIJIDFIIIJJI>BBEHHJFHHEEHH;A@?CEDEEEEEE@@A>5>>CD>ACA
+@HWI-ST584:365:C37MVACXX:1:1305:12954:25279 1:N:0:GCCAAT
+GGGAATGCTGACTCGGCAGGTCAAGGCCTTGTGGCTGGTGGCCCCATCGGGGCCCTTTGTCTCATGAAGGTTTAGCACTTCTCCTTTCCCCCGCCAACTGT
++
+CCCFFFFFHHHHHJIJJJIJACFFFH?D>GF1CGGC#################################################################
+@HWI-ST584:365:C37MVACXX:1:2304:18056:150403 1:N:0:GCCAAT
+CATTGAACAGTTTTTTCCTCTTGAAAGGGTAATTTTAGAGGATATTATTTTTTAAGTCACTAAAGATAGTTTTGCTTACAGAGAAATTTGTTTAAAAGGGG
++
+@CCFFFFFGHHHHJJJJJJJJJIIJJJJJ?GHIJJJIIIJJJJIIIJJJJJJJJJJJJJJJJJJJJJHHHHHHHFEFFFFEEEEEDDDDDEDDDDDDDDDB
+@HWI-ST584:365:C37MVACXX:1:1102:1484:117821 1:N:0:GCCAAT
+CCCTATTATCTATAGTTATCTCATTAAAACTGGATCTGGTTATAACATATAAAGGGCTGGATAGACCATTTTAAAAATAAAATCTATTTACTGCAAATGAA
++
+@@@DADDDFHHHHEH:CFHEHGEHGGEGIIIIGBHCHICGHEHIIIIIGIIFBEAHIGHIFHEIBFBBFHAFFGA@DHHIFCEEHFCEEDEBBCCCCC@C<
+@HWI-ST584:365:C37MVACXX:1:2107:13215:154024 1:N:0:GCCAAT
+ATTCATTACTCAGAACAAACCTAAAAAAAAAATAAAACCCTTTTGAAATTTAAGCAATGACTCATAAGAGATTGGAATTGGACTCAAATTACTGGCTTAAT
++
+CCCADFFFHGHHGJJJJJIJJJJJJJJJJJJIJJJJJIJGHIJJJIHHHHFHC@CDDECDEEECDDDDDDDDDDDCDCDDDDDDCCDCCCDCCDD@CDDDD
+@HWI-ST584:365:C37MVACXX:1:2305:14375:146794 1:N:0:GCCAAT
+CTTTTTTATGTTCAAGTCTTTCTTTTTGCAAGGATTTCTCTAATCTTGATCTGTGTTCATATACAACTTGTAACTGGGCGGAGAGGGACTCCTGGTGCTGC
++
+BBCFFFFFHHHHHJJJIJIJJIJJJJJJJJJJJIJJJJJJJJJJJJJJJJJJJIJIIJJJIJJJJJJIJJIJIJIHJHHGDBDBDDDDDDDDDDDDDDCDD
+@HWI-ST584:365:C37MVACXX:1:2102:21132:28209 1:N:0:GCCAAT
+CAGAAAGTGGGCCATTCATCTGAACCAAGTTCAGAGAATTTCCAGCACGGTGAAAAGATATGTTATGCAAGCACATAGATGTATTCAGTGGGGGTAGACAG
++
+CCCFFFFDHGHHHIJJJIJIJJIJJJJIJEHIJIFHIIGJJJFIJGHJJJFFGGEGGIIJJJEHIJJJFGIHHHFHBDFFFDFEDEDECCDDDB9@DDDDD
+@HWI-ST584:365:C37MVACXX:1:1203:3094:151750 1:N:0:GCCAAT
+GTTCGATAAGGTGTGAGGAGGAAGCAAAGGCTTTCCCACACTCCTTACATATGTAGGGTTTCTCACCGGTGTGGGTTCTTATGTGCACGATAAGGTGTGAG
++
+C@CFFFFFHHHDFCFHIJIJIGGGIIJJJJJJJJJJJGJGIIJIIIJJIIIJJHIJJJCGGIJJIJJHH=BBDDD;?BDDDDDFEDDDDDDDDDD>A@BCC
+@HWI-ST584:365:C37MVACXX:1:1102:15558:4133 1:N:0:GCCAAT
+AGAAAGGATATTCCAGTTTTTTTCCTTACCATTTAAAATATCAATAACTACCAAGATCACTCCTTCTGTCCAGAACAGTAAAACCTTGAGACTCCATGGTA
++
+CCCFFFFFHHHHHJJJIIJJJJJIJJJJJIIJJJJJIJIGIJJJIJJJJJJJJJJJIJJJJJJJJJJJIHGHHHFDFFFFEEEEDDDDDDDDDDDDDDDCC
+@HWI-ST584:365:C37MVACXX:1:1306:11209:39712 1:N:0:GCCAAT
+GGGCCATCAGGTTTCTCTTCTGTTAAATGTTTTAATCCATATTTTGAATCCACAATAGTTATGATACCATCAAGATAAATATCACTCCCTAATTCAGCATC
++
+CCCFFFFFHHHCFHIJJJJGIIHICIIJJFHIJJJJEGIIGIIJJIIGGHIIJJIJJGEIIJJJJIGHIJJJJJGGE=@@CHIAHFHCEFFFFFEDEEEED
+@HWI-ST584:365:C37MVACXX:1:1108:5887:31082 1:N:0:GCCAAT
+CGTGGAGGGTGGCGGGGCTCCTGGCCTCGTCTGGGTGAGGTTGGGAGCCTCGCTGGGGCTGCGGTCCCAGAGCTTCGGCAAAGCCACCAGGCCTTGGGGAG
++
+@@=DDDDFH<CFHIGGDIEFH@BBEFFCBBD?BCC5;?ADAACDD@DDBDDBDDDDBDDDDDDDBBDBCDDDDDD:<@BBB<>?A<AABBDDDDDDDDDB>
+@HWI-ST584:365:C37MVACXX:1:1105:7280:52404 1:N:0:GCCAAT
+ACGGGCTTAAAAAACGGCACACCAGGAGATTATATCCCGCACGTGGCTCAGAGGGTCCAACACCCACAGAGTCTCGTTGACTGCTAGCACAGCAGTCTGAG
++
+CCCFFFFFHGHDHIIHIIIHIJFIHIFGDGHGIIJJJJJJFIIHHHFFFFFEDDD?ABCDDDBDDDDBBACA>CDA?BCBCCDDDDDDDD?CDCBACDCCC
+@HWI-ST584:365:C37MVACXX:1:1304:18748:121360 1:N:0:GCCAAT
+GTGCAGGACAGTGGGTGCAGTGCACCGAGCGTGAGCCGAAGCAGGGCAAGGCATCACCTCCCCCGGGAAGTACAAGGGGTGAGGGAATTCCCTTTCCTAGC
++
+C@BFFFFFHHHFHJJGHGJJHHIJJJJIJIIFHGIIJJJDIIIGII<EHFFFFEDEEDEDDDDDDDDDDDCCCCCCBDD9>?BDDDDDCDDDDDDDDDDDD
+@HWI-ST584:365:C37MVACXX:1:2308:16415:46106 1:N:0:GCCAAT
+CGGCTATGGAGAAAAGGTAATTCATATATACTGCTGGTGGGAATGTAAATTAGTTCAGCCACTGTGGAAAGCAGTTTGGAGATTTCTCAAAGAACTGAAAA
++
+@@@FFFFFGHHBFG@GGHIIIGHI?AA?FH>BBFH>FEFIGIGGH?DDFGGGHBFFGDHGHGGGFGIIIGIIEHEACAEDEDFDECDCEEECCBCCCCCC>
+@HWI-ST584:365:C37MVACXX:1:2207:3186:50907 1:N:0:GCCAAT
+NCCCTACCCAGGCCAGGCATTTGCCAGATGCTTAATAAATACTTTTTGAGTTAATGCTACAATGCATCACTGGACATCTTTTAAAAGTAATATTCTTTTGG
++
+#1:BDDDDGHFHHGIGBEFC>HHGHGH>DFHGGIGEFEHCHGHGIIIIGH?DFFHIIIIIIIEDEHGH=@@D?CCEHFDDCEFBECCCCC@DDDDCDCCC#
+@HWI-ST584:365:C37MVACXX:1:2307:4484:32118 1:N:0:GCCAAT
+GCTTCGGCTCGCGCATGGTGCACACACACACTGGCCTGCGCCCACTGTCTGGCACTCCCTAGTGAGATGAACCCGGTACCTCAGATGGAAATGCAGAAATC
++
+@<@DDDDDFD@DD<<CF<FCEFHIEEG?H?FHGG?CFCCABBE<=6);;>36((;;-;?C39@C@C@>:>:(85<-)95>>CCCCC@C?############
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/refseq-small.txt	Tue Feb 11 09:28:56 2020 -0500
@@ -0,0 +1,89 @@
+#bin	name	chrom	strand	txStart	txEnd	cdsStart	cdsEnd	exonCount	exonStarts	exonEnds	score	name2	cdsStartStat	cdsEndStat	exonFrames
+10	NR_125367.1	chr17	+	10286448	10528857	10528857	10528857	11	10286448,10309464,10470853,10491705,10493959,10501389,10511461,10511670,10515775,10517061,10526068,	10286524,10309555,10470929,10491740,10494092,10501539,10511540,10511932,10515891,10517194,10528857,	0	MYHAS	none	none	-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+10	NM_001372.3	chr17	+	11501747	11873065	11501815	11872844	69	11501747,11511445,11513712,11514966,11520727,11522864,11532733,11535903,11539950,11543586,11547947,11550388,11554385,11556077,11568149,11572380,11572686,11583073,11584039,11592882,11597184,11597637,11603047,11604438,11607519,11608341,11622650,11631134,11642196,11645491,11648113,11650872,11656149,11659884,11660861,11666756,11671769,11672438,11684325,11686962,11687616,11696819,11700913,11711048,11713562,11725236,11725754,11726117,11737954,11757319,11772450,11774914,11778265,11783394,11784525,11786902,11790141,11795093,11797690,11806035,11808977,11827130,11833182,11835330,11837196,11840668,11845619,11865183,11872616,	11502232,11511642,11513871,11515097,11520939,11523098,11532901,11536020,11540101,11543701,11548016,11550515,11554641,11556319,11568285,11572577,11573111,11583296,11584206,11593753,11597315,11597764,11603200,11604564,11607759,11608502,11622807,11631239,11642354,11645630,11648401,11651083,11656277,11659993,11661009,11666931,11671943,11672646,11684491,11687065,11687856,11696981,11701110,11711211,11713686,11725379,11725916,11726351,11738215,11757745,11772570,11775103,11778501,11783517,11784730,11787067,11790282,11795264,11797813,11806229,11809126,11827258,11833410,11835522,11837388,11840839,11845802,11865573,11873065,	0	DNAH9	cmpl	cmpl	0,0,2,2,1,0,0,0,0,1,2,2,0,1,0,1,0,2,0,2,0,2,0,0,0,0,2,0,0,2,0,0,1,0,1,2,0,0,1,2,0,0,0,2,0,1,0,0,0,0,0,0,0,2,2,0,0,0,0,0,2,1,0,0,0,0,0,0,0,
+10	NM_153604.3	chr17	+	12569206	12672266	12569505	12666961	13	12569206,12608444,12618835,12620662,12626163,12639477,12642519,12647499,12649235,12655730,12661401,12663966,12666389,	12569560,12608510,12618891,12620738,12626325,12639653,12642645,12647753,12649389,12656663,12661530,12664024,12672266,	0	MYOCD	cmpl	cmpl	0,1,1,0,1,1,0,0,2,0,0,0,1,
+10	NM_001146312.2	chr17	+	12569206	12672266	12569505	12666961	14	12569206,12608444,12618835,12620662,12626163,12639477,12642519,12647499,12649235,12655730,12659730,12661401,12663966,12666389,	12569560,12608510,12618891,12620738,12626325,12639653,12642645,12647753,12649389,12656663,12659874,12661530,12664024,12672266,	0	MYOCD	cmpl	cmpl	0,1,1,0,1,1,0,0,2,0,0,0,0,1,
+10	NR_104605.1	chr17	-	12575178	12609452	12609452	12609452	3	12575178,12608250,12608689,	12575508,12608300,12609452,	0	LOC101928418	none	none	-1,-1,-1,
+82	NM_201433.1	chr17	-	9813925	10101868	9820544	10101707	14	9813925,9821317,9822942,9828792,9829957,9837482,9843442,9846437,9850210,9862518,9872993,9885120,9923093,10101524,	9820658,9821416,9823022,9828916,9830086,9837561,9843517,9846553,9850300,9862572,9873079,9885201,9923214,10101868,	0	GAS7	cmpl	cmpl	0,0,1,0,0,2,2,0,0,0,1,1,0,0,
+82	NM_003802.2	chr17	-	10204182	10276322	10204267	10267847	41	10204182,10204885,10206512,10206710,10209775,10210255,10212550,10212838,10214419,10215227,10215890,10216474,10219009,10219215,10222106,10223469,10223667,10224848,10227338,10231182,10233703,10235415,10236390,10243466,10243644,10247116,10248518,10248783,10249996,10253872,10257996,10258211,10258400,10261051,10263276,10263477,10265434,10265676,10267643,10274525,10276295,	10204282,10205020,10206608,10206815,10209946,10210381,10212754,10213147,10214544,10215393,10216074,10216671,10219128,10219342,10222496,10223560,10223813,10225025,10227581,10231438,10233840,10235539,10236508,10243554,10243718,10247426,10248689,10248933,10250115,10254011,10258100,10258310,10258464,10261144,10263388,10263505,10265591,10265820,10267859,10274576,10276322,	0	MYH13	cmpl	cmpl	0,0,0,0,0,0,0,0,1,0,2,0,1,0,0,2,0,0,0,2,0,2,1,0,1,0,0,0,1,0,1,1,0,0,2,1,0,0,0,-1,-1,
+82	NM_017533.2	chr17	-	10346606	10372876	10346691	10370062	40	10346606,10347920,10348111,10348292,10348553,10350329,10351134,10351712,10351934,10352180,10353769,10354093,10354642,10355257,10355732,10356103,10356468,10356959,10357871,10358257,10358488,10358930,10359130,10359801,10360736,10362567,10363268,10363519,10364232,10366181,10366406,10366654,10366867,10367788,10367997,10368758,10369589,10369858,10372604,10372853,	10346844,10348016,10348216,10348463,10348679,10350533,10351443,10351837,10352100,10352364,10353966,10354212,10354769,10355647,10355823,10356249,10356645,10357202,10358127,10358394,10358612,10359048,10359218,10359872,10361046,10362738,10363418,10363638,10364371,10366285,10366505,10366718,10366960,10367903,10368025,10368915,10369733,10370101,10372653,10372876,	0	MYH4	cmpl	cmpl	0,0,0,0,0,0,0,1,0,2,0,1,0,0,2,0,0,0,2,0,2,1,0,1,0,0,0,1,0,1,1,0,0,2,1,0,0,0,-1,-1,
+83	NM_001330139.1	chr17	-	10616611	10633646	10618769	10633168	5	10616611,10626586,10628327,10629520,10633096,	10618905,10626646,10628451,10629581,10633646,	0	TMEM220	cmpl	cmpl	2,2,1,0,0,
+83	NM_001330140.1	chr17	-	10616611	10633646	10618769	10633168	4	10616611,10628327,10629520,10633096,	10618905,10628451,10629581,10633646,	0	TMEM220	cmpl	cmpl	2,1,0,0,
+83	NM_001004313.1	chr17	-	10616638	10633646	10618769	10633168	6	10616638,10626586,10628327,10629520,10632347,10633096,	10618905,10626646,10628451,10629581,10632377,10633646,	0	TMEM220	cmpl	cmpl	2,2,1,0,0,0,
+83	NM_001173461.1	chr17	+	11144739	11467380	11144739	11461621	4	11144739,11166682,11459056,11461070,	11145377,11166843,11459209,11467380,	0	SHISA6	cmpl	cmpl	0,2,1,1,
+83	NM_001173462.1	chr17	+	11144739	11467380	11144739	11461621	5	11144739,11166682,11282730,11459056,11461070,	11145377,11166843,11282826,11459209,11467380,	0	SHISA6	cmpl	cmpl	0,2,1,1,1,
+83	NM_207386.3	chr17	+	11144739	11467380	11144739	11461621	6	11144739,11166682,11282730,11455212,11459056,11461070,	11145377,11166843,11282826,11455269,11459209,11467380,	0	SHISA6	cmpl	cmpl	0,2,1,1,1,1,
+84	NM_004662.2	chr17	+	11786218	11873065	11790234	11872844	15	11786218,11786902,11790141,11795093,11797690,11806035,11808977,11827130,11833182,11835330,11837196,11840668,11845619,11865183,11872616,	11786489,11787067,11790282,11795264,11797813,11806229,11809126,11827258,11833410,11835522,11837388,11840839,11845802,11865573,11873065,	0	DNAH9	cmpl	cmpl	-1,-1,0,0,0,0,2,1,0,0,0,0,0,0,0,
+84	NM_003010.3	chr17	+	11924134	12047148	11924203	12044577	11	11924134,11958205,11984672,11998891,12011106,12013691,12016549,12028610,12032455,12043155,12044463,	11924318,11958308,11984847,11999011,12011226,12013743,12016677,12028688,12032604,12043201,12047148,	0	MAP2K4	cmpl	cmpl	0,1,2,0,0,0,1,0,0,2,0,
+84	NM_001281435.1	chr17	+	11924134	12047148	11924203	12044577	12	11924134,11935582,11958205,11984672,11998891,12011106,12013691,12016549,12028610,12032455,12043155,12044463,	11924318,11935615,11958308,11984847,11999011,12011226,12013743,12016677,12028688,12032604,12043201,12047148,	0	MAP2K4	cmpl	cmpl	0,1,1,2,0,0,0,1,0,0,2,0,
+85	NM_001321168.1	chr17	+	12692828	12894961	12844390	12890425	20	12692828,12798256,12799723,12812213,12819216,12823071,12844372,12846904,12847385,12852456,12852965,12855817,12859183,12859971,12862033,12877405,12883374,12887847,12890417,12893348,	12693208,12798296,12799828,12812290,12819328,12823148,12844441,12846986,12847513,12852568,12853047,12855898,12859297,12860063,12862214,12877627,12883550,12888225,12890469,12894961,	0	ARHGAP44	cmpl	cmpl	-1,-1,-1,-1,-1,-1,0,0,1,0,1,2,2,2,1,2,2,1,1,-1,
+85	NR_135569.1	chr17	+	12692828	12894961	12894961	12894961	18	12692828,12798256,12799723,12812213,12819216,12823071,12832245,12844372,12846904,12847385,12852456,12852965,12855817,12859183,12859971,12862033,12887847,12893348,	12693208,12798296,12799828,12812290,12819328,12823148,12832363,12844441,12846986,12847513,12852568,12853047,12855898,12859297,12860063,12862214,12888225,12894961,	0	ARHGAP44	none	none	-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+85	NM_001321166.1	chr17	+	12692828	12894961	12693155	12893488	20	12692828,12798256,12799723,12812213,12819216,12823071,12832245,12844372,12846904,12847385,12852456,12852965,12855817,12859183,12859971,12862033,12877405,12883374,12887847,12893348,	12693208,12798296,12799828,12812290,12819328,12823148,12832363,12844441,12846986,12847513,12852568,12853047,12855898,12859297,12860063,12862214,12877627,12883550,12888225,12894961,	0	ARHGAP44	cmpl	cmpl	0,2,0,0,2,0,2,0,0,1,0,1,2,2,2,1,2,2,1,1,
+85	NM_001321164.1	chr17	+	12692828	12894961	12693155	12890425	21	12692828,12798256,12799723,12812213,12819216,12823071,12832245,12844372,12846904,12847385,12852456,12852965,12855817,12859183,12859971,12862033,12877405,12883374,12887847,12890417,12893348,	12693208,12798296,12799828,12812290,12819328,12823148,12832363,12844441,12846986,12847513,12852568,12853047,12855898,12859297,12860063,12862214,12877627,12883550,12888225,12890469,12894961,	0	ARHGAP44	cmpl	cmpl	0,2,0,0,2,0,2,0,0,1,0,1,2,2,2,1,2,2,1,1,-1,
+85	NM_014859.5	chr17	+	12692828	12894961	12693155	12893488	21	12692828,12798256,12799723,12812213,12819216,12823071,12832245,12844372,12846904,12847385,12852456,12852965,12855817,12859183,12859971,12862033,12876618,12877405,12883374,12887847,12893348,	12693208,12798296,12799828,12812290,12819328,12823148,12832363,12844441,12846986,12847513,12852568,12853047,12855898,12859297,12860063,12862214,12876636,12877627,12883550,12888225,12894961,	0	ARHGAP44	cmpl	cmpl	0,2,0,0,2,0,2,0,0,1,0,1,2,2,2,1,2,2,2,1,1,
+85	NM_001321167.1	chr17	+	12692828	12894961	12693155	12890425	22	12692828,12798256,12799723,12812213,12819216,12823071,12832245,12844372,12846904,12847385,12852456,12852965,12855817,12859183,12859971,12862033,12876618,12877405,12883374,12887847,12890417,12893348,	12693208,12798296,12799828,12812290,12819328,12823148,12832363,12844441,12846986,12847513,12852568,12853047,12855898,12859297,12860063,12862214,12876636,12877627,12883550,12888225,12890469,12894961,	0	ARHGAP44	cmpl	cmpl	0,2,0,0,2,0,2,0,0,1,0,1,2,2,2,1,2,2,2,1,1,-1,
+85	NM_006042.2	chr17	-	13397348	13505259	13399513	13504446	2	13397348,13503847,	13400135,13505259,	0	HS3ST3A1	cmpl	cmpl	2,0,
+663	NM_002472.2	chr17	-	10293641	10325267	10293770	10323544	40	10293641,10295198,10295858,10296147,10296401,10297565,10298449,10299646,10299869,10300119,10301760,10302084,10302859,10303706,10304185,10304362,10304591,10304859,10307646,10309357,10309590,10310006,10310208,10312413,10312595,10314093,10315686,10315926,10317218,10317508,10317702,10318432,10318608,10318788,10318997,10321961,10322203,10323334,10324979,10325246,	10293920,10295294,10295963,10296318,10296527,10297769,10298758,10299771,10300035,10300303,10301957,10302203,10302986,10304096,10304276,10304508,10304768,10305102,10307902,10309494,10309714,10310124,10310296,10312481,10312905,10314264,10315836,10316045,10317357,10317612,10317801,10318496,10318701,10318897,10319025,10322118,10322347,10323574,10325023,10325267,	0	MYH8	cmpl	cmpl	0,0,0,0,0,0,0,1,0,2,0,1,0,0,2,0,0,0,2,0,2,1,0,1,0,0,0,1,0,1,1,0,0,2,1,0,0,0,-1,-1,
+664	NM_005963.3	chr17	-	10395623	10421859	10395732	10419959	40	10395623,10397670,10397885,10398247,10398508,10399266,10399557,10400385,10400603,10401050,10401942,10402290,10403942,10404426,10404910,10405082,10406054,10406322,10408126,10408479,10408704,10409128,10409328,10411202,10411679,10412801,10415155,10415390,10415724,10415997,10416183,10416942,10417137,10417326,10418184,10419242,10419515,10419755,10421556,10421836,	10395885,10397766,10397990,10398418,10398634,10399470,10399866,10400510,10400769,10401234,10402139,10402409,10404069,10404816,10405001,10405228,10406231,10406565,10408382,10408616,10408828,10409246,10409416,10411273,10411989,10412972,10415305,10415509,10415863,10416101,10416282,10417006,10417230,10417441,10418212,10419399,10419659,10419999,10421587,10421859,	0	MYH1	cmpl	cmpl	0,0,0,0,0,0,0,1,0,2,0,1,0,0,2,0,0,0,2,0,2,1,0,1,0,0,0,1,0,1,1,0,0,2,1,0,0,0,-1,-1,
+664	NM_001100112.1	chr17	-	10424464	10452940	10424596	10451237	40	10424464,10426406,10426624,10426812,10427075,10427782,10428073,10428540,10428767,10429009,10429915,10430254,10431064,10432006,10432478,10432652,10432880,10433148,10434949,10436601,10436825,10438389,10438594,10439846,10440549,10440981,10442521,10442760,10443244,10443910,10446191,10446414,10447027,10447218,10447416,10448662,10450791,10451033,10452691,10452875,	10424749,10426502,10426729,10426983,10427201,10427986,10428382,10428665,10428933,10429193,10430112,10430373,10431191,10432396,10432569,10432798,10433057,10433391,10435205,10436738,10436949,10438507,10438682,10439923,10440859,10441152,10442671,10442879,10443383,10444014,10446290,10446478,10447120,10447333,10447444,10448819,10450935,10451257,10452734,10452940,	0	MYH2	cmpl	cmpl	0,0,0,0,0,0,0,1,0,2,0,1,0,0,2,0,0,0,2,0,2,1,0,1,0,0,0,1,0,1,1,0,0,2,1,0,0,0,-1,-1,
+664	NM_017534.5	chr17	-	10424464	10453017	10424596	10451237	40	10424464,10426406,10426624,10426812,10427075,10427782,10428073,10428540,10428767,10429009,10429915,10430254,10431064,10432006,10432478,10432652,10432880,10433148,10434949,10436601,10436825,10438389,10438594,10439846,10440549,10440981,10442521,10442760,10443244,10443910,10446191,10446414,10447027,10447218,10447416,10448662,10450791,10451033,10452691,10452952,	10424749,10426502,10426729,10426983,10427201,10427986,10428382,10428665,10428933,10429193,10430112,10430373,10431191,10432396,10432569,10432798,10433057,10433391,10435205,10436738,10436949,10438507,10438682,10439923,10440859,10441152,10442671,10442879,10443383,10444014,10446290,10446478,10447120,10447333,10447444,10448819,10450935,10451257,10452734,10453017,	0	MYH2	cmpl	cmpl	0,0,0,0,0,0,0,1,0,2,0,1,0,0,2,0,0,0,2,0,2,1,0,1,0,0,0,1,0,1,1,0,0,2,1,0,0,0,-1,-1,
+665	NM_002470.3	chr17	-	10531842	10560626	10531969	10558381	41	10531842,10532913,10533158,10533408,10533604,10534927,10535129,10535792,10536907,10537333,10538156,10538683,10539051,10541125,10541359,10542189,10542360,10542614,10542876,10543312,10543649,10543879,10544401,10544601,10545556,10545733,10546142,10547667,10547900,10549023,10549245,10550498,10550679,10551873,10552893,10553690,10554828,10555736,10558177,10559406,10560605,	10531996,10533051,10533254,10533513,10533775,10535053,10535333,10536101,10537032,10537499,10538340,10538880,10539170,10541252,10541749,10542280,10542506,10542791,10543119,10543568,10543786,10544003,10544519,10544689,10545627,10546040,10546313,10547817,10548019,10549162,10549349,10550597,10550743,10551966,10553002,10553718,10554985,10555880,10558389,10559465,10560626,	0	MYH3	cmpl	cmpl	0,0,0,0,0,0,0,0,1,0,2,0,1,0,0,2,0,0,0,2,0,2,1,0,1,0,0,0,1,0,1,1,0,0,2,1,0,0,0,-1,-1,
+665	NM_004589.3	chr17	-	10583648	10600885	10584435	10600824	6	10583648,10590043,10595188,10596080,10599057,10600551,	10584570,10590159,10595281,10596278,10599148,10600885,	0	SCO1	cmpl	cmpl	0,1,1,1,0,0,
+665	NM_020233.4	chr17	+	10600926	10614875	10608243	10614461	4	10600926,10608226,10609754,10614150,	10600984,10608844,10609871,10614875,	0	ADPRM	cmpl	cmpl	-1,0,1,1,
+666	NR_049723.1	chr17	-	10619259	10619899	10619899	10619899	1	10619259,	10619899,	0	MAGOH2P	none	none	-1,
+666	NR_073456.1	chr17	+	10633093	10670369	10670369	10670369	4	10633093,10639921,10657545,10669995,	10633193,10639955,10657679,10670369,	0	TMEM220-AS1	none	none	-1,-1,-1,-1,
+666	NR_073455.1	chr17	+	10633093	10670369	10670369	10670369	5	10633093,10637155,10639918,10657545,10669995,	10633217,10637224,10639955,10657679,10670369,	0	TMEM220-AS1	none	none	-1,-1,-1,-1,-1,
+666	NR_073457.1	chr17	+	10633093	10671347	10671347	10671347	4	10633093,10657545,10669995,10671181,	10633217,10657679,10670173,10671347,	0	TMEM220-AS1	none	none	-1,-1,-1,-1,
+666	NR_073458.1	chr17	+	10633093	10718481	10718481	10718481	4	10633093,10705715,10709479,10718215,	10633217,10705825,10709559,10718481,	0	TMEM220-AS1	none	none	-1,-1,-1,-1,
+666	NR_036581.1	chr17	-	10698229	10707416	10707416	10707416	2	10698229,10706922,	10699265,10707416,	0	LINC00675	none	none	-1,-1,
+666	NM_001101387.1	chr17	-	10725791	10741418	10728548	10728962	2	10725791,10741261,	10729100,10741418,	0	PIRT	cmpl	cmpl	0,-1,
+675	NM_144680.3	chr17	-	11880755	11900689	11881273	11896146	9	11880755,11886613,11887429,11893778,11894290,11895759,11898874,11900126,11900589,	11882061,11886724,11887514,11893867,11894480,11896228,11898996,11900427,11900689,	0	ZNF18	cmpl	cmpl	1,1,0,1,0,0,-1,-1,-1,
+675	NM_001303281.1	chr17	-	11880755	11900827	11881273	11896146	7	11880755,11886613,11887429,11893778,11894290,11895759,11900747,	11882061,11886724,11887514,11893867,11894480,11896228,11900827,	0	ZNF18	cmpl	cmpl	1,1,0,1,0,0,-1,
+675	NM_001303282.1	chr17	-	11880755	11900827	11881273	11896146	7	11880755,11886613,11887429,11893778,11894290,11895759,11900747,	11882061,11886721,11887514,11893867,11894480,11896228,11900827,	0	ZNF18	cmpl	cmpl	1,1,0,1,0,0,-1,
+676	NR_030613.1	chr17	+	11985215	11985313	11985313	11985313	1	11985215,	11985313,	0	MIR744	none	none	-1,
+680	NR_034144.1	chr17	+	12453284	12540504	12540504	12540504	3	12453284,12493757,12538317,	12453394,12494065,12540504,	0	LINC00670	none	none	-1,-1,-1,
+680	NR_034145.1	chr17	+	12453284	12540504	12540504	12540504	4	12453284,12487876,12493757,12538317,	12453394,12488038,12494065,12540504,	0	LINC00670	none	none	-1,-1,-1,-1,
+681	NR_104607.1	chr17	-	12663450	12693601	12693601	12693601	2	12663450,12693459,	12667035,12693601,	0	LOC100128006	none	none	-1,-1,
+682	NR_039747.1	chr17	-	12820584	12820659	12820659	12820659	1	12820584,	12820659,	0	MIR1269B	none	none	-1,
+683	NM_018127.6	chr17	-	12894928	12921381	12896134	12921264	24	12894928,12897003,12897741,12898080,12898279,12899019,12899256,12899863,12901728,12903472,12905590,12905757,12906795,12908305,12909069,12909237,12913929,12914979,12916523,12917755,12919084,12920178,12920387,12921019,	12896362,12897148,12897820,12898201,12898379,12899129,12899295,12900002,12901825,12903591,12905676,12905896,12906891,12908418,12909142,12909296,12913988,12915099,12916592,12917813,12919149,12920249,12920438,12921381,	0	ELAC2	cmpl	cmpl	0,2,1,0,2,0,0,2,1,2,0,2,2,0,2,0,1,1,1,0,1,2,2,0,
+683	NM_173717.1	chr17	-	12894928	12921381	12896134	12921264	24	12894928,12897003,12897741,12898080,12898279,12899019,12899256,12899863,12901728,12903472,12905590,12905757,12906795,12908305,12909069,12909237,12913929,12914979,12916523,12917755,12919084,12920178,12920387,12921019,	12896362,12897148,12897820,12898201,12898379,12899129,12899295,12900002,12901825,12903591,12905673,12905896,12906891,12908418,12909142,12909296,12913988,12915099,12916592,12917813,12919149,12920249,12920438,12921381,	0	ELAC2	cmpl	cmpl	0,2,1,0,2,0,0,2,1,2,0,2,2,0,2,0,1,1,1,0,1,2,2,0,
+683	NM_001165962.1	chr17	-	12894928	12921381	12896134	12921264	23	12894928,12897003,12897741,12898080,12898279,12899019,12899256,12899863,12901728,12903472,12905590,12905757,12906795,12908305,12909069,12909237,12913929,12916523,12917755,12919084,12920178,12920387,12921019,	12896362,12897148,12897820,12898201,12898379,12899129,12899295,12900002,12901825,12903591,12905676,12905896,12906891,12908418,12909142,12909296,12913988,12916592,12917813,12919149,12920249,12920438,12921381,	0	ELAC2	cmpl	cmpl	0,2,1,0,2,0,0,2,1,2,0,2,2,0,2,0,1,1,0,1,2,2,0,
+687	NR_031679.1	chr17	-	13446845	13446963	13446963	13446963	1	13446845,	13446963,	0	MIR548H3	none	none	-1,
+16	NM_000633.2	chr18	-	60790578	60986613	60795857	60985899	3	60790578,60985314,60986406,	60795992,60986185,60986613,	0	BCL2	cmpl	cmpl	0,0,-1,
+16	NR_033881.1	chr18	+	61771324	62090836	62090836	62090836	10	61771324,61794618,61916535,61955029,61961161,62074355,62079539,62083166,62089964,62090166,	61771469,61794673,61916628,61955127,61961350,62074493,62079618,62083346,62090039,62090836,	0	LINC01924	none	none	-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+130	NM_001278268.1	chr18	+	59992519	60054943	59992585	60052267	10	59992519,60015400,60017044,60021623,60025522,60027187,60028912,60033940,60035933,60051983,	59992660,60015482,60017170,60021767,60025574,60027282,60029026,60033993,60036717,60054943,	0	TNFRSF11A	cmpl	cmpl	0,0,1,1,1,2,1,1,0,1,
+130	NM_001270951.1	chr18	+	59992519	60054943	59992585	60052267	7	59992519,60015400,60017044,60021623,60025480,60027187,60051983,	59992660,60015482,60017170,60021767,60025574,60027282,60054943,	0	TNFRSF11A	cmpl	cmpl	0,0,1,1,1,2,1,
+130	NM_001270950.1	chr18	+	59992519	60054943	59992585	60052267	8	59992519,60015400,60017044,60021623,60025480,60027187,60028912,60051983,	59992660,60015482,60017170,60021767,60025574,60027282,60029026,60054943,	0	TNFRSF11A	cmpl	cmpl	0,0,1,1,1,2,1,1,
+130	NM_001270949.1	chr18	+	59992519	60054943	59992585	60051992	9	59992519,60015400,60017044,60021623,60025480,60027187,60028912,60033940,60051983,	59992660,60015482,60017170,60021767,60025574,60027282,60029026,60033993,60054943,	0	TNFRSF11A	cmpl	cmpl	0,0,1,1,1,2,1,1,0,
+130	NM_003839.3	chr18	+	59992519	60054943	59992585	60052267	10	59992519,60015400,60017044,60021623,60025480,60027187,60028912,60033940,60035933,60051983,	59992660,60015482,60017170,60021767,60025574,60027282,60029026,60033993,60036717,60054943,	0	TNFRSF11A	cmpl	cmpl	0,0,1,1,1,2,1,1,0,1,
+130	NM_194449.3	chr18	+	60382671	60647676	60382916	60646664	17	60382671,60497267,60506016,60527667,60562243,60563013,60570196,60572456,60582145,60587191,60608950,60612341,60625861,60630600,60639746,60642629,60645494,	60384492,60497464,60506142,60527834,60562390,60563244,60570399,60572517,60582241,60587347,60609151,60612504,60625992,60630705,60639941,60642858,60647676,	0	PHLPP1	cmpl	cmpl	0,1,0,0,2,2,2,1,2,2,2,2,0,2,2,2,0,
+131	NM_004869.3	chr18	-	61056422	61089752	61058207	61089492	11	61056422,61060641,61064266,61066474,61067280,61067779,61070939,61074664,61077522,61078699,61089465,	61058309,61060782,61064486,61066556,61067429,61067936,61071059,61074732,61077679,61078811,61089752,	0	VPS4B	cmpl	cmpl	0,0,2,1,2,1,1,2,1,0,0,
+1044	NM_017742.5	chr18	+	60190657	60245818	60190657	60243812	14	60190657,60206913,60209730,60212034,60217580,60223435,60225919,60227819,60230241,60231803,60232234,60237335,60241289,60243744,	60191596,60207025,60209807,60212106,60217693,60223530,60226003,60227877,60230377,60231868,60232329,60237464,60242783,60245818,	0	ZCCHC2	cmpl	cmpl	0,0,1,0,0,2,1,1,2,0,2,1,1,1,
+1044	NR_126534.1	chr18	+	60190657	60253976	60253976	60253976	15	60190657,60206913,60209730,60212034,60217580,60223435,60225919,60227819,60230241,60231803,60232234,60237335,60241289,60243744,60251678,	60191596,60207025,60209807,60212106,60217693,60223530,60226003,60227877,60230377,60231868,60232329,60237464,60242783,60243885,60253976,	0	ZCCHC2	none	none	-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+1050	NM_000657.2	chr18	-	60985186	60986613	60985281	60985899	2	60985186,60986406,	60986185,60986613,	0	BCL2	cmpl	cmpl	0,-1,
+1050	NM_002035.2	chr18	-	60994970	61034506	60999014	61034351	10	60994970,61002489,61006032,61011642,61018120,61022436,61022730,61026968,61030011,61034243,	60999134,61002591,61006116,61011726,61018312,61022532,61022796,61027025,61030101,61034506,	0	KDSR	cmpl	cmpl	0,0,0,0,0,0,0,0,0,0,
+1051	NM_002639.4	chr18	+	61144143	61172318	61151661	61170955	7	61144143,61151654,61154178,61156579,61160185,61166352,61170562,	61144278,61151829,61154316,61156697,61160328,61166520,61172318,	0	SERPINB5	cmpl	cmpl	-1,0,0,0,1,0,0,
+1052	NM_080474.2	chr18	+	61223392	61236560	61223392	61234244	7	61223392,61225584,61226810,61228317,61231210,61232677,61233839,	61223560,61225659,61226951,61228435,61231353,61232845,61236560,	0	SERPINB12	cmpl	cmpl	0,0,0,0,1,0,0,
+1052	NM_001307928.1	chr18	+	61223392	61236560	61223392	61234244	7	61223392,61225584,61226810,61228317,61231210,61232677,61233839,	61223560,61225719,61226951,61228435,61231353,61232845,61236560,	0	SERPINB12	cmpl	cmpl	0,0,0,0,1,0,0,
+1052	NM_012397.3	chr18	+	61254533	61266433	61255901	61264597	8	61254533,61255884,61256889,61259581,61260087,61261588,61262262,61264192,	61254684,61256066,61256949,61259710,61260205,61261731,61262418,61266433,	0	SERPINB13	cmpl	cmpl	-1,0,0,0,0,1,0,0,
+1052	NM_001307923.1	chr18	+	61254533	61266433	61255901	61264597	8	61254533,61255884,61256889,61259581,61260087,61261588,61262262,61264192,	61254684,61256066,61256976,61259710,61260205,61261731,61262418,61266433,	0	SERPINB13	cmpl	cmpl	-1,0,0,0,0,1,0,0,
+1052	NM_002974.3	chr18	-	61304492	61311553	61304952	61310811	8	61304492,61306418,61306867,61308107,61308993,61310394,61310646,61311442,	61305357,61306574,61307010,61308225,61309122,61310451,61310837,61311553,	0	SERPINB4	cmpl	cmpl	0,0,1,0,0,0,0,-1,
+1052	NM_175041.1	chr18	-	61304492	61311553	61304952	61310811	8	61304492,61306418,61306867,61308107,61308993,61310394,61310646,61311442,	61305357,61306511,61307010,61308225,61309122,61310451,61310837,61311553,	0	SERPINB4	cmpl	cmpl	0,0,1,0,0,0,0,-1,
+1052	NM_006919.2	chr18	-	61322430	61329197	61322890	61328450	8	61322430,61324064,61324503,61325746,61326632,61328033,61328285,61329079,	61323295,61324220,61324646,61325864,61326761,61328090,61328476,61329197,	0	SERPINB3	cmpl	cmpl	0,0,1,0,0,0,0,-1,
+1053	NM_080475.3	chr18	+	61369537	61391127	61377427	61390633	9	61369537,61370084,61377412,61378568,61379798,61383268,61387246,61388064,61390228,	61369611,61370240,61377595,61378628,61379927,61383386,61387389,61388220,61391127,	0	SERPINB11	cmpl	cmpl	-1,-1,0,0,0,0,1,0,0,
+1053	NM_001291278.1	chr18	+	61370192	61391127	61377427	61390633	6	61370192,61377412,61378568,61379798,61388064,61390228,	61370240,61377595,61378628,61379927,61388220,61391127,	0	SERPINB11	cmpl	cmpl	-1,0,0,0,0,0,
+1053	NM_001291279.1	chr18	+	61370192	61391127	61387296	61390633	7	61370192,61377412,61378568,61379798,61387246,61388064,61390228,	61370240,61377595,61378628,61379927,61387389,61388220,61391127,	0	SERPINB11	cmpl	cmpl	-1,-1,-1,-1,0,0,0,
+1053	NM_001040147.2	chr18	+	61420280	61472610	61449606	61471869	8	61420280,61449588,61459626,61460394,61463499,61465837,61468099,61471470,	61420354,61449774,61459677,61460511,61463617,61465980,61468246,61472610,	0	SERPINB7	cmpl	cmpl	-1,0,0,0,0,1,0,0,
+1053	NM_001261831.1	chr18	+	61442608	61472610	61449606	61471869	7	61442608,61449588,61460394,61463499,61465837,61468099,61471470,	61442950,61449774,61460511,61463617,61465980,61468246,61472610,	0	SERPINB7	cmpl	cmpl	-1,0,0,0,1,0,0,
+1053	NM_003784.3	chr18	+	61442608	61472610	61449606	61471869	8	61442608,61449588,61459626,61460394,61463499,61465837,61468099,61471470,	61442950,61449774,61459677,61460511,61463617,61465980,61468246,61472610,	0	SERPINB7	cmpl	cmpl	-1,0,0,0,0,1,0,0,
+1053	NM_001261830.1	chr18	+	61445010	61472610	61449606	61471869	8	61445010,61449588,61459626,61460394,61463499,61465837,61468099,61471470,	61445059,61449774,61459677,61460511,61463617,61465980,61468246,61472610,	0	SERPINB7	cmpl	cmpl	-1,0,0,0,0,1,0,0,
+1054	NM_002575.2	chr18	+	61554938	61571124	61558678	61570539	8	61554938,61558669,61562497,61564324,61564960,61568973,61569637,61570134,	61555004,61558846,61562617,61564453,61565078,61569116,61569802,61571124,	0	SERPINB2	cmpl	cmpl	-1,0,0,0,0,1,0,0,
+1054	NM_001143818.1	chr18	+	61554938	61571124	61558678	61570539	9	61554938,61557071,61558669,61562497,61564324,61564960,61568973,61569637,61570134,	61555004,61557329,61558846,61562617,61564453,61565078,61569116,61569802,61571124,	0	SERPINB2	cmpl	cmpl	-1,-1,0,0,0,0,1,0,0,
+1054	NM_005024.2	chr18	+	61575223	61603345	61582744	61602476	8	61575223,61582735,61584689,61585198,61587021,61597278,61600281,61602071,	61575274,61582912,61584755,61585336,61587139,61597421,61600437,61603345,	0	SERPINB10	cmpl	cmpl	-1,0,0,0,0,1,0,0,
+1055	NM_001123366.1	chr18	+	61616587	61627646	61620689	61627589	4	61616587,61620587,61621641,61627391,	61616634,61620761,61621791,61627646,	0	HMSD	cmpl	cmpl	-1,0,0,0,
+1055	NM_001031848.1	chr18	+	61637262	61653887	61645542	61653500	7	61637262,61645532,61647034,61648954,61650812,61652326,61653491,	61637404,61645710,61647172,61649072,61650955,61652479,61653887,	0	SERPINB8	cmpl	cmpl	-1,0,0,0,1,0,0,
+1055	NM_001276490.1	chr18	+	61637262	61656608	61650934	61654512	6	61637262,61647034,61648954,61650812,61652326,61654107,	61637404,61647172,61649072,61650955,61652479,61656608,	0	SERPINB8	cmpl	cmpl	-1,-1,-1,0,0,0,
+1055	NM_002640.3	chr18	+	61637262	61656608	61645542	61654512	7	61637262,61645532,61647034,61648954,61650812,61652326,61654107,	61637404,61645710,61647172,61649072,61650955,61652479,61656608,	0	SERPINB8	cmpl	cmpl	-1,0,0,0,1,0,0,
+1055	NM_198833.1	chr18	+	61637262	61656608	61645542	61654512	7	61637262,61645532,61647034,61648954,61650812,61652326,61654107,	61637421,61645710,61647172,61649072,61650955,61652479,61656608,	0	SERPINB8	cmpl	cmpl	-1,0,0,0,1,0,0,
+1056	NR_027245.1	chr18	-	61747242	61816260	61816260	61816260	4	61747242,61765067,61765810,61816008,	61747636,61765226,61765874,61816260,	0	LINC00305	none	none	-1,-1,-1,-1,
+1057	NR_033983.1	chr18	-	61880316	61927290	61927290	61927290	3	61880316,61925452,61927149,	61882281,61925754,61927290,	0	LINC01538	none	none	-1,-1,-1,
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/res.html	Tue Feb 11 09:28:56 2020 -0500
@@ -0,0 +1,141 @@
+<!DOCTYPE html>
+<html>
+<head>
+	<title>Chimerae</title>
+	<style type="text/css">
+		body { font-family:Arial, Helvetica, Sans-Serif; font-size:0.8em;}
+		#report { border-collapse:collapse;}
+		#report h4 { margin:0px; padding:0px;}
+		#report img { float:right;}
+		#report ul { margin:10px 0 10px 40px; padding:0px;}
+		#report th { background:#7CB8E2 url(static/images/header_bkg.png) repeat-x scroll center left; color:#fff; padding:7px 15px; text-align:left;}
+		#report td { background:#C7DDEE none repeat-x scroll center left; color:#000; padding:7px 15px; }
+		#report tr.odd td { background:#fff url(static/images/row_bkg.png) repeat-x scroll center left; cursor:pointer; }
+		#report div.arrow { background:transparent url(static/images/arrows.png) no-repeat scroll 0px -16px; width:16px; height:16px; display:block;}
+		#report div.up { background-position:0px 0px;}
+	</style>
+	<script src="./js/jquery.min.js" type="text/javascript"></script>
+	<script type="text/javascript">
+		$(document).ready(function(){
+			$("#report tr:odd").addClass("odd");
+			$("#report tr:not(.odd)").hide();
+			$("#report tr:first-child").show();
+			$("#report tr.odd").click(function(){
+				$(this).next("tr").toggle();
+				$(this).find(".arrow").toggleClass("up");
+			});
+			//$("#report").jExpand();
+		});
+	</script>
+</head>
+<body>
+	<table id="report">
+		<tr>
+			<th>L1 chromosome</th>
+			<th>L1 start</th>
+			<th>L1 end</th>
+			<th>L1 strand</th>
+			<th>test read #</th>
+			<th>Chimera chromosome</th>
+			<th>Chimera start</th>
+			<th>Chimera end</th>
+			<th>Chimera strand</th>
+			<th>test read #</th>
+			<th>Known RNA</th>
+			<th>Known EST</th>
+			<th></th>
+		</tr>
+		<tr>
+			<td>chr17:13850000-13860000</td>
+			<td>5524</td>
+			<td>5625</td>
+			<td>-</td>
+			<td>1</td>
+			<td>chr17:13850000-13860000</td>
+			<td>5361</td>
+			<td>5462</td>
+			<td>+</td>
+			<td>1</td>
+			<td></td>
+			<td></td>
+			<td><div class="arrow"></div></td>
+		</tr>
+		<tr>
+			<td valign=top colspan=10></td>
+			<td valign=top>
+			</td>
+			<td valign=top>
+			</td>
+			<td></td>
+		</tr>
+		<tr>
+			<td>chr18:62900000-62910000</td>
+			<td>6369</td>
+			<td>6470</td>
+			<td>-</td>
+			<td>1</td>
+			<td>chr18:62900000-62910000</td>
+			<td>6229</td>
+			<td>6330</td>
+			<td>+</td>
+			<td>1</td>
+			<td><a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/NM_152538.2">NM_152538.2</a></td>
+			<td><a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/DA456960.1">DA456960.1</a></td>
+			<td><div class="arrow"></div></td>
+		</tr>
+		<tr>
+			<td valign=top colspan=10></td>
+			<td valign=top>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/NM_001143970.1">NM_001143970.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/NR_033888.1">NR_033888.1</a><br>
+			</td>
+			<td valign=top>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/DA439948.1">DA439948.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/BQ343973.1">BQ343973.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/HY039921.1">HY039921.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/HY011359.1">HY011359.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/FY211757.1">FY211757.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/FY213409.1">FY213409.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/FY210726.1">FY210726.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/FY213828.1">FY213828.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/FY213215.1">FY213215.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/FY213186.1">FY213186.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/DB059299.1">DB059299.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/DA848406.1">DA848406.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/DA452145.1">DA452145.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/CD300204.1">CD300204.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/BM554436.1">BM554436.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/BI829507.1">BI829507.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/BI828564.1">BI828564.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/BI462449.1">BI462449.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/AA292896.1">AA292896.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/HY264403.1">HY264403.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/DB203607.1">DB203607.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/DB084198.1">DB084198.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/DA760572.1">DA760572.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/DA739826.1">DA739826.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/DA456573.1">DA456573.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/DA461374.1">DA461374.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/DA587715.1">DA587715.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/DA395712.1">DA395712.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/DA686009.1">DA686009.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/DA568154.1">DA568154.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/BP247141.1">BP247141.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/CF596224.1">CF596224.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/BX479603.1">BX479603.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/CD657445.1">CD657445.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/BQ900308.1">BQ900308.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/BM910071.1">BM910071.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/BM017308.1">BM017308.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/BI052118.1">BI052118.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/BF176186.1">BF176186.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/BF680445.1">BF680445.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/BF208422.1">BF208422.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/BE567163.1">BE567163.1</a><br>
+				<a target="_blank" rel="noopener noreferrer" href="https://www.ncbi.nlm.nih.gov/nuccore/AW894450.1">AW894450.1</a><br>
+			</td>
+			<td></td>
+		</tr>
+	</table>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/res_files/final_result_chimerae.txt	Tue Feb 11 09:28:56 2020 -0500
@@ -0,0 +1,3 @@
+Chimera.Chr	Chimera.Start	Chimera.End	Chimera.Strand	L1.Chr	L1.Start	L1.End	L1.Strand	Unique.Chr	Unique.Start	Unique.End	Unique.Strand	ID_final	info	dataf...16..nfastq...16..	GeneName	GeneStrand	repName	repStart	repEnd	repWidth	repStrand
+chr17:13850000-13860000	5361	5625	-	chr17:13850000-13860000	5524	5625	-	chr17:13850000-13860000	5361	5462	+	Id_1	no	1	no_gene	*	no	0	0	0	*
+chr18:62900000-62910000	6229	6470	-	chr18:62900000-62910000	6369	6470	-	chr18:62900000-62910000	6229	6330	+	Id_2	no	1	no_gene	*	no	0	0	0	*
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/res_files/first_results.txt	Tue Feb 11 09:28:56 2020 -0500
@@ -0,0 +1,3 @@
+Chimera.Chr	Chimera.Start	Chimera.End	Chimera.Strand	L1.Chr	L1.Start	L1.End	L1.Strand	Unique.Chr	Unique.Start	Unique.End	Unique.Strand	ID_final	info	dataf...16..nfastq...16..
+chr17:13850000-13860000	5361	5625	-	chr17:13850000-13860000	5524	5625	-	chr17:13850000-13860000	5361	5462	+	Id_1	no	1
+chr18:62900000-62910000	6229	6470	-	chr18:62900000-62910000	6369	6470	-	chr18:62900000-62910000	6229	6330	+	Id_2	no	1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/res_files/results.txt	Tue Feb 11 09:28:56 2020 -0500
@@ -0,0 +1,3 @@
+L1 chromosome 	 L1 start 	 L1 end 	 L1 strand	 test read #	 Chimera chromosome	 Chimera start 	 Chimera end 	 Chimera strand	 test read #
+chr17:13850000-13860000	5524	5625	-	1	chr17:13850000-13860000	5361	5462	+	1
+chr18:62900000-62910000	6369	6470	-	1	chr18:62900000-62910000	6229	6330	+	1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/rmsk-small.txt	Tue Feb 11 09:28:56 2020 -0500
@@ -0,0 +1,36 @@
+#bin	swScore	milliDiv	milliDel	milliIns	genoName	genoStart	genoEnd	genoLeft	strand	repName	repClass	repFamily	repStart	repEnd	repLeft	id
+690	314	359	51	57	chr17	13850045	13850158	-67345052	-	MER5B	DNA	hAT-Charlie	-2	176	63	1
+690	2449	104	0	0	chr17	13850158	13850455	-67344755	-	AluSg	SINE	Alu	-13	297	1	1
+690	314	359	51	57	chr17	13850455	13850518	-67344692	-	MER5B	DNA	hAT-Charlie	-116	62	1	1
+690	652	181	233	25	chr17	13850644	13850803	-67344407	-	MER53	DNA	hAT	-1	192	1	1
+690	906	295	147	10	chr17	13850865	13851252	-67343958	+	MLT1K	LTR	ERVL-MaLR	5	444	-151	1
+690	1661	164	104	43	chr17	13851262	13851435	-67343775	+	L1M3	LINE	L1	4914	5074	-1066	1
+690	2169	146	3	22	chr17	13851435	13851750	-67343460	-	AluSz	SINE	Alu	-3	309	1	1
+690	1661	164	104	43	chr17	13851750	13851952	-67343258	+	L1M3	LINE	L1	5075	5312	-828	1
+690	421	241	72	43	chr17	13851952	13852091	-67343119	+	MLT1K	LTR	ERVL-MaLR	453	595	0	1
+690	250	233	0	62	chr17	13852345	13852409	-67342801	+	L2c	LINE	L2	3323	3382	-5	1
+690	415	316	96	129	chr17	13853970	13854135	-67341075	-	L3	LINE	CR1	-1	4488	4317	1
+690	856	225	33	0	chr17	13854135	13854286	-67340924	+	AluJo	SINE	Alu	137	292	-20	1
+690	415	316	96	129	chr17	13854286	13854516	-67340694	-	L3	LINE	CR1	-173	4316	4106	1
+690	2240	82	14	25	chr17	13854795	13855076	-67340134	+	AluSx	SINE	Alu	1	278	-34	1
+690	317	215	49	0	chr17	13856476	13856620	-67338590	+	(TA)n	Simple_repeat	Simple_repeat	2	152	0	1
+690	22	0	0	0	chr17	13856642	13856664	-67338546	+	AT_rich	Low_complexity	Low_complexity	1	22	0	1
+690	201	290	0	46	chr17	13856763	13856828	-67338382	+	L2c	LINE	L2	3357	3418	-8	1
+690	207	111	0	100	chr17	13857811	13857861	-67337349	+	L2a	LINE	L2	3382	3426	0	1
+690	234	283	7	143	chr17	13857864	13858004	-67337206	+	L3	LINE	CR1	4058	4178	-311	1
+690	573	251	51	6	chr17	13858004	13858180	-67337030	+	MER96B	DNA	hAT	232	415	-2	1
+690	3018	86	0	5	chr17	13858486	13858873	-67336337	+	MLT2A1	LTR	ERVL	1	385	-59	1
+690	974	148	16	120	chr17	13858883	13859128	-67336082	+	MLT1B	LTR	ERVL-MaLR	177	388	-2	1
+690	2255	134	3	7	chr17	13859736	13860043	-67335167	+	AluSg	SINE	Alu	1	306	-4	1
+1064	9370	128	36	36	chr18	62899485	62901011	-15176237	+	THE1C-int	LTR	ERVL-MaLR	1	1526	-54	1
+1064	1953	143	73	17	chr18	62901011	62901366	-15175882	+	THE1C	LTR	ERVL-MaLR	1	375	0	1
+1064	195	320	23	31	chr18	62902099	62902233	-15175015	-	MIRb	SINE	MIR	-6	256	120	1
+1064	225	0	0	0	chr18	62902616	62902641	-15174607	+	(CA)n	Simple_repeat	Simple_repeat	2	26	0	1
+1064	330	26	0	0	chr18	62902641	62902679	-15174569	+	(GA)n	Simple_repeat	Simple_repeat	2	40	0	1
+1064	201	39	0	0	chr18	62903194	62903220	-15174028	+	(TG)n	Simple_repeat	Simple_repeat	2	27	0	1
+1064	222	306	22	0	chr18	62904516	62904600	-15172648	-	L2b	LINE	L2	-8	3418	3306	1
+1064	40	49	0	0	chr18	62904689	62904750	-15172498	+	AT_rich	Low_complexity	Low_complexity	1	61	0	1
+1064	258	32	0	0	chr18	62904980	62905011	-15172237	+	(TCTA)n	Simple_repeat	Simple_repeat	4	34	0	1
+1064	205	237	33	17	chr18	62905555	62905615	-15171633	+	GA-rich	Low_complexity	Low_complexity	3	63	0	1
+1064	236	149	21	0	chr18	62907603	62907650	-15169598	+	(CA)n	Simple_repeat	Simple_repeat	2	49	0	1
+1064	304	217	33	0	chr18	62907681	62907773	-15169475	+	(TA)n	Simple_repeat	Simple_repeat	2	96	0	1
Binary file test-data/rna-small.fa.gz has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/two.fastq	Tue Feb 11 09:28:56 2020 -0500
@@ -0,0 +1,100 @@
+@HWI-ST584:365:C37MVACXX:1:1305:19372:56141 2:N:0:GCCAAT
+CGATCTGGCTGCGACATCTGTCACCCCATTGATCGCCAGGGTTGATTCGGATGATCTGGCTGGCTAGGCGGGTGTCCCCTTCCTCCCTCACCGCTCCATGT
++
+@C@FFFEDFFFBHIIIIGGIJJIIIJJIIJGIJHIEHGJJEGGGIJJIJJDHGHHHHGFEFEFDD@BDCBBB&504+:?<A(9::3<9<(28?@BB>:3>4
+@HWI-ST584:365:C37MVACXX:1:2301:7296:160148 2:N:0:GCCAAT
+GGGCTTTGTGTCTGGCCAGCTTGATTTTCCTAATGGTCTCATCTCCTTTGCTAGTGTCTTTGTCATGCGTCTCTGGCCCTCGTGGGTAAATGACAAACGGG
++
+@@CFFFFFHHFFHJJHJHHIGJJGIJJJJIIGEHGIEHGIICGGIJEGGHEGGHHIIJJJJJGHIIIJJIIJJIIFGHHFFEAADD?@CCDEDDDDDDDDB
+@HWI-ST584:365:C37MVACXX:1:1205:13370:110105 2:N:0:GCCAAT
+CGAAGCTCTGTGCAATCAGCTGGTGAATCTGCTGCTGCCGGTCCTTCTTTCGAACACTCTCATAGCTGGGCAGGCGAGCTGGCTGCCACAGGGGCAGCTGG
++
+@<@BDDDAHFHHFGHIGHGCHGGGA>@HDBEHHGGGBDCHG:@DGEGEHGH7;CH>AGC@EGGEEHEAADDFDB>B;=B;>C<<?82::?A?B<355?9>C
+@HWI-ST584:365:C37MVACXX:1:2308:12673:6166 2:N:0:GCCAAT
+CATTTTTCTATAACACTATTATAATAAATTCACATGGAAAAGTACAAGGATGAGCAATTTTTTACTTTAGAAATGTTTCAAAAGGGGAGGTAAACTTGATG
++
+CCCFFFFFHHHHHJJJJJJJJJIJJJJJJJJHHHIJIIIJJJFHIIJJJJHIJIJJIJJJJJJJJJJJJJIJHIJIHHHGGFHFFFDDDDDDDDDDDDCDD
+@HWI-ST584:365:C37MVACXX:1:2207:7253:147412 2:N:0:GCCAAT
+AAAAGGCTCAGGAAGAATCAAGTGCAATGATGCAGTGGTTACAGAAAATGAACAAAACTGCAACAAAATGGCAGCAGACACCTGCACCTACAGATACTGAA
++
+@CCFFFFFHHHHHIJJJJJJIJGHIIJIJGHIJJJHHIFHJJIIJJIIJJGHIJJIJJJJJJJJJIJJJJJHHHHFFFFFEDEEDDDDDDDDDDDDDDEDD
+@HWI-ST584:365:C37MVACXX:1:2308:14918:56009 2:N:0:GCCAAT
+AGAGCCCCACTTTTTCCGTTTTGTAATTATTTGGCGAAAAGAAATTTGCTTATAGACTATGTTTAATGGGATTAACCATGTCCTCATTTTTCTTTTCATCC
++
+CCCFFFFFGHHHHJJJIHHJJJJHGJJJJJJJIJJJJJJJJJJJJJJJJJGHIJJJJJJJJIJJHHHHHHFFFFFEEEEEEEFDDDDEFEDDDDDDDDEEC
+@HWI-ST584:365:C37MVACXX:1:1201:11510:45354 2:N:0:GCCAAT
+GTTATAGAAAGGAAAGATAAACATGTAAGGTTTCATACTAAAATTTTTATTACATTAAAGTTTGCTCTAACTTTTGTTTTCAAATACAGATTATGAGACAG
++
+@@BDDEFADFHFGIIIJJJIEHHHJEHGHGGIIJIIJIHFHIJJIJIJJJGIGBHGHGGGIECGGIIJJGHJIJIIFGGGGGHFFEFHBDFFFFDCCEDED
+@HWI-ST584:365:C37MVACXX:1:2108:4159:38107 2:N:0:GCCAAT
+GCAAGAGAACATTTTACTGTTGTACAATCATGTTCTGGGGGTTTGATTGTTTACAGGATATTCCAAAATAAAAGGTCTCTGGAAGATTTTCATTGAGGATA
++
+?7@?DD8DD+<CFEB??CFHHGIC@>EGIDAH9C?FGH):@)(/?9C)=.8=CCG>>2@CC@7)=?C9E@:??@1(6@A>>A;;55;A>>CDED@>@C@CC
+@HWI-ST584:365:C37MVACXX:1:1203:20582:36223 2:N:0:GCCAAT
+GTTGTTGACTTGCTGACGTTGGGGTGGTTGGTAGTGCAGTTAAGTTGGCTGCATGATGGGATGTTGCCTCAGATGTCGGTGCAGCGAAGCCCTGTAGGTGG
++
+B@@BDFDDFHFDAAH>CGFHI=FB8?@6DEH??DBDGAF)8@FBGHH@@FCDGHGA>HBA9@D@CCCEECACCD<ACA=;??C>C<<@B-?ACACCCA>@#
+@HWI-ST584:365:C37MVACXX:1:1307:2892:120144 2:N:0:GCCAAT
+CGAGATCTTAAGGAACCTCTATCATGAGAACATTGTGAAGTACAAAGGAATCTGCACAGAAGACGGAGGAAATGGTATTAAGCTCATCATGGAATTTCTGC
++
+@<@ADFFFHHHHFIIJIGHEEFHIICDFHGGGIJIEHGGH?DHGIHIEGC9?FHCIGJGIJICCHI:GEHHGGHC@DDFBBECECCCCA@ACCCDDDCEDD
+@HWI-ST584:365:C37MVACXX:1:1305:12954:25279 2:N:0:GCCAAT
+ACGAATTTGGGGCTACGAAGAGGAATAGCGAAAAAGCAAATCTGTTTCAACTGATGGGAACCCTATAGCTATAGAACTTGGGGGCTATCTCCTATGCCCCT
++
+CCCFFFFFHGHGHIJJJJJJJJIIJJJIGIGIJIGG;FHEF=BAHIGIJGDGDC;CECHADFFDCCC;@@CCCCC>@C>CDDD=59A>?CDCACDCCDDB8
+@HWI-ST584:365:C37MVACXX:1:2304:18056:150403 2:N:0:GCCAAT
+CTTTAGAATAATTGTTTGCTTTCAGATGATTAAAAAAAGGAGATTGTATCTAGGAAAAAAGTGTGAATGCTTCAAAGGAGAGATACTGATAATTGTGACTT
++
+CCCFFFFFGHHHHJJJJJJJJJJJJIJJJJJIJJJJJJJJGJJJJJIJIJFGIJIJJJJJJEHEHHHFFFFFFFEEEEEDDDDDDDDEDDDDDEDCDDDDC
+@HWI-ST584:365:C37MVACXX:1:1102:1484:117821 2:N:0:GCCAAT
+AATAAAATTATAAATCACTACCGTGGCCACATTTTAAAAGATATAATATTTTATCTATATTGCATTATTGCCAATTCAAATTTAGTTATATAATAAAGGAA
++
+?@@DDFFDFFHAHJGIFIIJJ;EHIII>@CGGFIIIIJCGBDBDHGGGDHBFCHEGIJIGGGGGHG@FHHIGIJIGJIJHHGEHHHFEFEFCDFEDEEDA>
+@HWI-ST584:365:C37MVACXX:1:2107:13215:154024 2:N:0:GCCAAT
+GTTTGAAAAGGCAAGTTTGTCCCTGGGCAATTTTCAAAATATTTCTTTAATGTGTTTTCACAATACTGTTTACCTAATAAATCTTAAGTTTTTAAAAGCAA
++
+B@@FFFFFHHHHHJIHIJJJJJIJIJJJJJJJJIJJJJIJJJJJJJJJJJHIFHHIJJJJIIJJJJJJIJJIJJJIJJHHHHHHHFFFEFFFDDEEED=CD
+@HWI-ST584:365:C37MVACXX:1:2305:14375:146794 2:N:0:GCCAAT
+GTCTGGCATCTCCTCCTCATGCTGCGTCTGGCCACCTACTGCGGCGGCCGCTGCTGAGACGCTCGCTCGGACCAAGGGGAGGAGACGGCGGGGGCGGCCGC
++
+CCCFFFFFHHHHHJJJJJJIJJJJJJJJJJJIJGIJJJJJJIGIDHFCDD=BDDDDDDDDDBDDDDDDDDBDDDDDDDD<BD??ABBBDDDDDD.5@9<<5
+@HWI-ST584:365:C37MVACXX:1:2102:21132:28209 2:N:0:GCCAAT
+GTTCCTCCCCTTCCCCAACCCTGGGGAAATAAGAAACAATTCATATACTAGATCTAAAGTTTCATTAAAATTGCTTATGCCCTGTCTCAGGCATTTTAAGT
++
+CCCFFFFFHHHHHJJJJJIJJGIJJIGIJBGHDGIJ;GHGIBGDECDADBBFHGJIJJB@FGHIIIGIGIEEBEHH@D>;CEEEECEDDD<?ACDDEB>@3
+@HWI-ST584:365:C37MVACXX:1:1203:3094:151750 2:N:0:GCCAAT
+CTAAACACATGCGGACACACACCGGGGAGAAGCCCTATGAATGTAAGGACTGTGGGAAAGCCTACAATAGGGTTTATCTACTGAATGAGCATGTGAAAACT
++
+CCCFFFFFHHGGHJJJJJGHIJJJJJJIGIIIIJJJIIJHHHHHHHFFFECCCEEDDCDDDDDDDDDDDDDDAADDDDDEDEDDDDCDDDDCDCDEEDDDD
+@HWI-ST584:365:C37MVACXX:1:1102:15558:4133 2:N:0:GCCAAT
+CTGAAACTTTGTCTCTTCTTCCGAAATGCTCCTATCTGGAAATAAATTCCCCTGTTTAACTTCCTTCAATTTATATCTTCATTCTACCATGGAGTCTCAAG
++
+CCCFFFFFHHHHHJJJJJJJJJJJJJJJJJJJJIJIIJJJDGDHIJGIIIGHIJHIIIJHJJJJJJJJJJJJJJIIIJHHGHHGHEEEFFFDEECEDDDDD
+@HWI-ST584:365:C37MVACXX:1:1306:11209:39712 2:N:0:GCCAAT
+AGCAACATAGTAAAAGAGTAGCGGTCATTTTAAATGAATTTGGGGAAGGAAGTGCGCTGGAGAAATCCTTAGCTGTCAGCCAAGGTGGAGAGCTCTATGAA
++
+@C@FFFFDDDFFF<EFIICEECGIIIHIIGHHIFGGDGIIIJJJIABEEGFGIGIJJIIGHHFBEFFEEEEECDDCCDDCDBD9?5:?9?><A>CDAADA>
+@HWI-ST584:365:C37MVACXX:1:1108:5887:31082 2:N:0:GCCAAT
+TGAGTTAGTCATTGTTTTTCTCCGAGGCGGCCTGCTTGCCACAGCCCTGCTCCCCAAGGCCTGGTGGCTTTGCCGAAGCTCTGGGACCGCAGCCCCAGCGA
++
+B@CFDEBEBFFHGJHIIJJJJIJJJJIBGHJGEHGGGIIIIFEEHFFFFDCEEDDDDDBDDDDDCCDDDDDDDCDBBDDDDCCDDDDDDDDDDDDDDBDD@
+@HWI-ST584:365:C37MVACXX:1:1105:7280:52404 2:N:0:GCCAAT
+GTTTTTGGTGTGGATGTCCTTTCTGTTTGTTAGTTTTCCTTCTAACACAGAGGACCCTCAGCGCAGGTCTGTTGGAGTTTGCTAGAGGTCCACTCCAGACC
++
+@B@FFFFDDDDHFIIIIIHHIBEIJAFGIIIHG?GHI?CFHIECGHCGGCEHIGIIHHGEHIIGEFFBBDEEEE@;?>CCDDDCDAABCCCDDCCDACABB
+@HWI-ST584:365:C37MVACXX:1:1304:18748:121360 2:N:0:GCCAAT
+CTCCAAGCCAATCGCGGGATACAATCTCCTGGTGTGCCGTTTGCTAAGACCATTGGAAAAGCACAGTATTAGGGTGGGAGTGACCCGAATTTCCAGGTACC
++
+CCCFFFFFHHHHHJJJJJJJJJJJJJJJJIJJDGFGGIJIIIJIJJJJHHEHHFFFFFFEECEDDD@CFEEEDDABDDDDBDDDDDDDDDDDDEEDDACDC
+@HWI-ST584:365:C37MVACXX:1:2308:16415:46106 2:N:0:GCCAAT
+AGGAAGCAGCAGAAAGGCCCTGGGAGCTCGGTGGGTCCCTTCACAGGCGGCGGAAGGGTTGTTCCCATCTTTATGTCCATGTGTACTCAGTGTTTAGTTCC
++
+@@?DDDFDFDDBAHG<EBGGEFHIEHIGE@FDB@G6BFGBGGCGCAAC@:'37560<5285;AACDCCDD>ACC@44:A@C:A:@C:@>C>@:(9:AA@C@
+@HWI-ST584:365:C37MVACXX:1:2207:3186:50907 2:N:0:GCCAAT
+CCACTGTCCAACCAGTCCCAGTGAGATGAACCAGGCACCTCAGTTGGAAATGCAGAAATCACCTGTCTTCTGCATCGATCATGCTGGGAGCTGCAGAATGA
++
+CCCDFFFFHHFHFIGHHFHGGGHEGG@@FEHIIIGGHFGIGIIFIGIDHI@BGHHIJJHGGIJIGIIHIGCEEAHEACBFCEDDEE>??BBBDDAC@ACAC
+@HWI-ST584:365:C37MVACXX:1:2307:4484:32118 2:N:0:GCCAAT
+TCATAATTATGCAAGATGTGTCAGTACTTAGCTATTGGGAAAATATTACAGTTAAATTTTTATTGTGGGAGGAGCCAAGATGGCCGAATAGGAAAAGTTCC
++
+;8?BDDD?D>?>?E<:2A,3,3<AH@H<F@<+<4AF@A3:C;:<C<D4EB**0?B*?<9?<(?F?####################################
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool-data/blastdb.loc.sample	Tue Feb 11 09:28:56 2020 -0500
@@ -0,0 +1,31 @@
+#This is a sample file distributed with Galaxy that is used to define a
+#list of nucleotide BLAST databases, using three columns tab separated
+#(longer whitespace are TAB characters):
+#
+#<unique_id>      <database_caption>     <base_name_path>
+#
+#The captions typically contain spaces and might end with the release date.
+#It is important that the actual database name does not have a space in it.
+#
+#So, for example, if your database is nt and the path to your base name 
+#is /galaxy/data/blastdb/nt/DDmmmYYYY/nt, then the blastdb.loc entry 
+#could look like this:
+#
+#02dec2009     nt 02-Dec-2009    /galaxy/data/blastdb/nt/02dec2009/nt
+#
+#A /galaxy/data/blastdb/nt/02dec2009 directory would contain all of 
+#the "nt" blast indexes from ftp://ftp.ncbi.nlm.nih.gov/blast/db/nt* (e.g.):
+#
+#-rw-r--r--  1 wychung galaxy  23437408 2008-04-09 11:26 nt.chunk.00.nhr
+#-rw-r--r--  1 wychung galaxy   3689920 2008-04-09 11:26 nt.chunk.00.nin
+#-rw-r--r--  1 wychung galaxy 251215198 2008-04-09 11:26 nt.chunk.00.nsq
+#...etc...
+#
+#The blastdb.loc file should include one entry per line for each database. 
+#
+#See also blastdb_p.loc, used for protein BLAST database.
+#
+#Note that for backwards compatibility with workflows, the <unique_id> of
+#an entry must be the path that was in the original loc file.
+#The metadata <unique_id> is the value stored in workflows for "database".
+#
\ No newline at end of file
--- a/tool-data/bwa_index.loc.sample	Wed Jan 31 09:59:07 2018 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-#-rw-r--r--  1 james    universe 830134 2005-09-13 10:12 phiX.fa.amb
-#-rw-r--r--  1 james    universe 527388 2005-09-13 10:12 phiX.fa.ann
-#-rw-r--r--  1 james    universe 269808 2005-09-13 10:12 phiX.fa.bwt
-#...etc...
-#
-#Your bwa_index.loc file should include an entry per line for each
-#index set you have stored. The "file" in the path does not actually
-#exist, but it is the prefix for the actual index files.  For example:
-#
-#phiX174                                phiX    phiX174                 /depot/data2/galaxy/phiX/base/phiX.fa
-#hg18canon                              hg18    hg18 Canonical  /depot/data2/galaxy/hg18/base/hg18canon.fa
-#hg18full                               hg18    hg18 Full               /depot/data2/galaxy/hg18/base/hg18full.fa
-#/orig/path/hg19.fa             hg19    hg19                    /depot/data2/galaxy/hg19/base/hg19.fa
-#...etc...
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool-data/bwa_mem_index.loc.sample	Tue Feb 11 09:28:56 2020 -0500
@@ -0,0 +1,38 @@
+#This is a sample file distributed with Galaxy that enables tools
+#to use a directory of BWA indexed sequences data files. You will need
+#to create these data files and then create a bwa_index.loc file
+#similar to this one (store it in this directory) that points to
+#the directories in which those files are stored. The bwa_index.loc
+#file has this format (longer white space characters are TAB characters):
+#
+#<unique_build_id>   <dbkey>   <display_name>   <file_path>
+#
+#So, for example, if you had phiX indexed stored in 
+#/depot/data2/galaxy/phiX/base/, 
+#then the bwa_index.loc entry would look like this:
+#
+#phiX174   phiX   phiX Pretty   /depot/data2/galaxy/phiX/base/phiX.fa
+#
+#and your /depot/data2/galaxy/phiX/base/ directory
+#would contain phiX.fa.* files:
+#
+#-rw-r--r--  1 james    universe 830134 2005-09-13 10:12 phiX.fa.amb
+#-rw-r--r--  1 james    universe 527388 2005-09-13 10:12 phiX.fa.ann
+#-rw-r--r--  1 james    universe 269808 2005-09-13 10:12 phiX.fa.bwt
+#...etc...
+#
+#Your bwa_index.loc file should include an entry per line for each
+#index set you have stored. The "file" in the path does not actually
+#exist, but it is the prefix for the actual index files.  For example:
+#
+#phiX174				phiX	phiX174			/depot/data2/galaxy/phiX/base/phiX.fa
+#hg18canon				hg18	hg18 Canonical	/depot/data2/galaxy/hg18/base/hg18canon.fa
+#hg18full				hg18	hg18 Full		/depot/data2/galaxy/hg18/base/hg18full.fa
+#/orig/path/hg19.fa		hg19	hg19			/depot/data2/galaxy/hg19/base/hg19.fa
+#...etc...
+#
+#Note that for backwards compatibility with workflows, the unique ID of
+#an entry must be the path that was in the original loc file, because that
+#is the value stored in the workflow for that parameter. That is why the
+#hg19 entry above looks odd. New genomes can be better-looking.
+#
--- a/tool_data_table_conf.xml.sample	Wed Jan 31 09:59:07 2018 -0500
+++ b/tool_data_table_conf.xml.sample	Tue Feb 11 09:28:56 2020 -0500
@@ -1,7 +1,13 @@
+<!-- Use the file tool_data_table_conf.xml.oldlocstyle if you don't want to update your loc files as changed in revision 4550:535d276c92bc-->
 <tables>
-    <!-- Locations of configurations -->
-    <table name="bwa_indexes" comment_char="#">
+    <!-- Locations of indexes in the BWA mapper format for BWA versions 0.6 and higher including BWA MEM and ALN-->
+    <table name="bwa_mem_indexes" comment_char="#">
         <columns>value, dbkey, name, path</columns>
-        <file path="tool-data/bwa_index.loc" />
+        <file path="tool-data/bwa_mem_index.loc" />
     </table>
-</tables>
\ No newline at end of file
+    <!-- Locations of nucleotide (mega)blast databases -->
+    <table name="blastdb" comment_char="#">
+        <columns>value, name, path</columns>
+        <file path="tool-data/blastdb.loc" />
+    </table>
+</tables>
--- a/tool_dependencies.xml	Wed Jan 31 09:59:07 2018 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-<?xml version="1.0"?>
-<tool_dependency>
-    <package name="bwa" version="0.7.12">
-        <repository changeset_revision="051eba708f43" name="bwa" owner="devteam" prior_installation_required="True" toolshed="https://toolshed.g2.bx.psu.edu" />
-    </package>
-    <package name="package_blast_plus_2_2_28" version="2.2.28">
-        <repository changeset_revision="222036f7cab6" name="package_blast_plus_2_2_28" owner="iuc" prior_installation_required="True" toolshed="https://toolshed.g2.bx.psu.edu" />
-    </package>
-    <package name="bedtools" version="2.24.0">
-        <repository changeset_revision="d25966c8ddeb" name="bedtools" owner="iuc" prior_installation_required="True" toolshed="https://toolshed.g2.bx.psu.edu" />
-    </package>
-    <package name="fastx" version="0.0.13">
-        <repository changeset_revision="ec66ae4c269b" name="package_fastx_toolkit_0_0_13" owner="devteam" prior_installation_required="True" toolshed="https://toolshed.g2.bx.psu.edu" />
-    </package>
-    <package name="repeat_masker" version="0.1.2">
-        <repository changeset_revision="5673e72241aa" name="repeat_masker" owner="bgruening" prior_installation_required="True" toolshed="https://toolshed.g2.bx.psu.edu" />
-    </package>
-    <package name="R" version="0.1.2">
-        <repository changeset_revision="5673e72241aa" name="repeat_masker" owner="bgruening" prior_installation_required="True" toolshed="https://toolshed.g2.bx.psu.edu" />
-    </package>
-    
-    
-    
-</tool_dependency>
\ No newline at end of file