@@ -0,0 +1,2660 @@
+%22%22%22%0A.. Copyright 2017 EMBL-European Bioinformatics Institute%0A%0A   Licensed under the Apache License, Version 2.0 (the %22License%22);%0A   you may not use this file except in compliance with the License.%0A   You may obtain a copy of the License at%0A%0A       http://www.apache.org/licenses/LICENSE-2.0%0A%0A   Unless required by applicable law or agreed to in writing, software%0A   distributed under the License is distributed on an %22AS IS%22 BASIS,%0A   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A   See the License for the specific language governing permissions and%0A   limitations under the License.%0A%22%22%22%0A%0Afrom __future__ import print_function%0A%0Aimport os.path%0Aimport pytest # pylint: disable=unused-import%0A%0Afrom process_rnaseq import process_rnaseq%0A%0A@pytest.mark.wgbs%0A@pytest.mark.pipeline%0Adef test_wgbs_pipeline():%0A    %22%22%22%0A    Test case to ensure that the RNA-seq pipeline code works.%0A%0A    Running the pipeline with the test data from the command line:%0A%0A    .. code-block:: none%0A       runcompss                                  %5C%0A          --lang=python                           %5C%0A          --library_path=$%7BHOME%7D/bin              %5C%0A          --pythonpath=/%3Cpyenv_virtenv_dir%3E/lib/python2.7/site-packages/ %5C%0A          --log_level=debug                       %5C%0A          process_wgbs.py                         %5C%0A             --taxon_id 10090                     %5C%0A             --genome /%3Cdataset_dir%3E/Mouse.GRCm38.fasta %5C%0A             --assembly GRCm38                    %5C%0A             --fastq1 /%3Cdataset_dir%3E/expt_1.fastq %5C%0A             --fastq2 /%3Cdataset_dir%3E/expt_2.fastq %5C%0A             --aligner bowtie2                    %5C%0A             --aligner_path $%7BHOME%7D/lib/bowtie2-2.3.2 %5C%0A             --bss_path $%7BHOME%7D/lib/BSseeker2%0A    %22%22%22%0A    home = os.path.expanduser('~')%0A    resource_path = os.path.join(os.path.dirname(__file__), %22data/%22)%0A%0A    genomefa_file = resource_path + %22bsSeeker.Mouse.GRCm38.fasta%22%0A    fastq1_file = resource_path + %22bsSeeker.Mouse.GRCm38_1.fastq%22%0A    fastq2_file = resource_path + %22bsSeeker.Mouse.GRCm38_2.fastq%22%0A%0A    rs_handle = process_rnaseq()%0A    rs_files, rs_meta = rs_handle.run(%0A        %5B%0A            genomefa_file,%0A            fastq1_file,%0A            fastq2_file%0A        %5D,%0A        %7B%0A            'assembly' : 'GRCh38',%0A            'aligner' : 'bowtie2',%0A            'aligner_path' : home + '/lib/bowtie2-2.3.2',%0A            'bss_path' : home + '/lib/BSseeker2'%0A        %7D,%0A        %5B%5D%0A    )%0A%0A    print(rs_files)%0A%0A    # Add tests for all files created%0A    for f_out in rs_files:%0A        print(%22WGBS RESULTS FILE:%22, f_out)%0A        assert os.path.isfile(f_out) is True%0A        assert os.path.getsize(f_out) %3E 0%0A

Test the pipeline code for the WGBS pipeline