Source: q2-demux
Version: 2019.10.0-1
Control: block 950430 by -1

With pandas 1.0 from experimental:

=================================== FAILURES =================================== __________________________ SummarizeTests.test_basic ___________________________

self = <q2_demux.tests.test_demux.SummarizeTests testMethod=test_basic>

    def test_basic(self):
        bsi = BarcodeSequenceFastqIterator(self.barcodes, self.sequences)

        barcode_map = pd.Series(
            ['AAAA', 'AACC'], name='bc',
            index=pd.Index(['sample_1', 'sample2'], name='id')
        )
        barcode_map = qiime2.CategoricalMetadataColumn(barcode_map)

        demux_data, ecc = emp_single(bsi, barcode_map,
                                     golay_error_correction=False)
        # test that an index.html file is created and that it has size > 0
        with tempfile.TemporaryDirectory() as output_dir:
            # TODO: Remove _PlotQualView wrapper
            result = summarize(output_dir, _PlotQualView(demux_data,
> paired=False), n=2)

q2_demux/tests/test_demux.py:860:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
q2_demux/_summarize/_visualizer.py:169: in summarize
    forward_length_table = _build_seq_len_table(forward_scores)
q2_demux/_summarize/_visualizer.py:109: in _build_seq_len_table
    return q2templates.df_to_html(frame)
/usr/lib/python3/dist-packages/q2templates/util.py:45: in df_to_html
    with pd.option_context('display.max_colwidth', -1):
/usr/lib/python3/dist-packages/pandas/_config/config.py:407: in __enter__
    _set_option(pat, val, silent=True)
/usr/lib/python3/dist-packages/pandas/_config/config.py:127: in _set_option
    o.validator(v)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

value = -1

    def is_nonnegative_int(value):
        """
        Verify that value is None or a positive int.

        Parameters
        ----------
        value : None or int
                The `value` to be checked.

        Raises
        ------
        ValueError
            When the value is not None or is a negative integer
        """

        if value is None:
            return

        elif isinstance(value, int):
            if value >= 0:
                return

        msg = "Value must be a nonnegative integer or None"
>       raise ValueError(msg)
E       ValueError: Value must be a nonnegative integer or None

/usr/lib/python3/dist-packages/pandas/_config/config.py:844: ValueError
___________ SummarizeTests.test_inconsistent_sequence_length_paired ____________

self = <q2_demux.tests.test_demux.SummarizeTests testMethod=test_inconsistent_sequence_length_paired>

    def test_inconsistent_sequence_length_paired(self):
        forward = [('@s1/1 abc/1', 'G', '+', 'Y'),
                   ('@s2/1 abc/1', 'CCC', '+', 'PPP'),
                   ('@s3/1 abc/1', 'AAAAA', '+', 'PPPPP'),
                   ('@s4/1 abc/1', 'TTTTTTT', '+', 'PPPPPPP')]
        reverse = [('@s1/1 abc/1', 'AAAAAAA', '+', 'YYYYYYY'),
                   ('@s2/1 abc/1', 'TTTTT', '+', 'PPPPP'),
                   ('@s3/1 abc/1', 'GGG', '+', 'PPP'),
                   ('@s4/1 abc/1', 'C', '+', 'P')]
        bpsi = BarcodePairedSequenceFastqIterator(self.barcodes, forward,
                                                  reverse)

        barcode_map = pd.Series(
            ['AAAA', 'AACC'], name='bc',
            index=pd.Index(['sample1', 'sample2'], name='id')
        )
        barcode_map = qiime2.CategoricalMetadataColumn(barcode_map)

        demux_data, ecc = emp_paired(bpsi, barcode_map,
                                     golay_error_correction=False)
        lengths = [1, 3, 5, 7]
        for n in range(1, 6):
            with tempfile.TemporaryDirectory() as output_dir:
                lengths_ = lengths[0:5-n] if n < 4 else [1]
                # TODO: Remove _PlotQualView wrapper
                summarize(output_dir, _PlotQualView(demux_data,
>                                                   paired=True), n=n)

q2_demux/tests/test_demux.py:1101:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
q2_demux/_summarize/_visualizer.py:169: in summarize
    forward_length_table = _build_seq_len_table(forward_scores)
q2_demux/_summarize/_visualizer.py:109: in _build_seq_len_table
    return q2templates.df_to_html(frame)
/usr/lib/python3/dist-packages/q2templates/util.py:45: in df_to_html
    with pd.option_context('display.max_colwidth', -1):
/usr/lib/python3/dist-packages/pandas/_config/config.py:407: in __enter__
    _set_option(pat, val, silent=True)
/usr/lib/python3/dist-packages/pandas/_config/config.py:127: in _set_option
    o.validator(v)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

value = -1

    def is_nonnegative_int(value):
        """
        Verify that value is None or a positive int.

        Parameters
        ----------
        value : None or int
                The `value` to be checked.

        Raises
        ------
        ValueError
            When the value is not None or is a negative integer
        """

        if value is None:
            return

        elif isinstance(value, int):
            if value >= 0:
                return

        msg = "Value must be a nonnegative integer or None"
>       raise ValueError(msg)
E       ValueError: Value must be a nonnegative integer or None

/usr/lib/python3/dist-packages/pandas/_config/config.py:844: ValueError
___________ SummarizeTests.test_inconsistent_sequence_length_single ____________

self = <q2_demux.tests.test_demux.SummarizeTests testMethod=test_inconsistent_sequence_length_single>

    def test_inconsistent_sequence_length_single(self):
        sequences = [('@s1/1 abc/1', 'GGGGGGG', '+', 'YYYYYYY'),
                     ('@s2/1 abc/1', 'CCCCC', '+', 'PPPPP'),
                     ('@s3/1 abc/1', 'AAA', '+', 'PPP'),
                     ('@s4/1 abc/1', 'T', '+', 'P')]
        bsi = BarcodeSequenceFastqIterator(self.barcodes, sequences)

        barcode_map = pd.Series(
            ['AAAA', 'AACC'], name='bc',
            index=pd.Index(['sample1', 'sample2'], name='id')
        )
        barcode_map = qiime2.CategoricalMetadataColumn(barcode_map)

        demux_data, ecc = emp_single(bsi, barcode_map,
                                     golay_error_correction=False)
        lengths = [1, 3, 5, 7]
        for n in range(1, 6):
            with tempfile.TemporaryDirectory() as output_dir:
                lengths_ = lengths[0:5-n] if n < 4 else [1]
                # TODO: Remove _PlotQualView wrapper
                summarize(output_dir, _PlotQualView(demux_data,
>                                                   paired=False), n=n)

q2_demux/tests/test_demux.py:1063:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
q2_demux/_summarize/_visualizer.py:169: in summarize
    forward_length_table = _build_seq_len_table(forward_scores)
q2_demux/_summarize/_visualizer.py:109: in _build_seq_len_table
    return q2templates.df_to_html(frame)
/usr/lib/python3/dist-packages/q2templates/util.py:45: in df_to_html
    with pd.option_context('display.max_colwidth', -1):
/usr/lib/python3/dist-packages/pandas/_config/config.py:407: in __enter__
    _set_option(pat, val, silent=True)
/usr/lib/python3/dist-packages/pandas/_config/config.py:127: in _set_option
    o.validator(v)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

value = -1

    def is_nonnegative_int(value):
        """
        Verify that value is None or a positive int.

        Parameters
        ----------
        value : None or int
                The `value` to be checked.

        Raises
        ------
        ValueError
            When the value is not None or is a negative integer
        """

        if value is None:
            return

        elif isinstance(value, int):
            if value >= 0:
                return

        msg = "Value must be a nonnegative integer or None"
>       raise ValueError(msg)
E       ValueError: Value must be a nonnegative integer or None

/usr/lib/python3/dist-packages/pandas/_config/config.py:844: ValueError
________________________ SummarizeTests.test_paired_end ________________________

self = <q2_demux.tests.test_demux.SummarizeTests testMethod=test_paired_end>

    def test_paired_end(self):
        barcodes = self.barcodes[:3]

        forward = self.sequences[:3]

        reverse = [('@s1/1 abc/1', 'CCC', '+', 'YYY'),
                   ('@s2/1 abc/1', 'GGG', '+', 'PPP'),
                   ('@s3/1 abc/1', 'TTT', '+', 'PPP')]

bpsi = BarcodePairedSequenceFastqIterator(barcodes, forward, reverse)

        barcode_map = pd.Series(
            ['AAAA', 'AACC', 'TTAA'], name='bc',
            index=pd.Index(['sample1', 'sample2', 'sample3'], name='id')
        )
        barcode_map = qiime2.CategoricalMetadataColumn(barcode_map)

        demux_data, ecc = emp_paired(bpsi, barcode_map,
                                     golay_error_correction=False)
        with tempfile.TemporaryDirectory() as output_dir:
            result = summarize(output_dir, _PlotQualView(demux_data,
>                                                        paired=True), n=2)

q2_demux/tests/test_demux.py:978:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
q2_demux/_summarize/_visualizer.py:169: in summarize
    forward_length_table = _build_seq_len_table(forward_scores)
q2_demux/_summarize/_visualizer.py:109: in _build_seq_len_table
    return q2templates.df_to_html(frame)
/usr/lib/python3/dist-packages/q2templates/util.py:45: in df_to_html
    with pd.option_context('display.max_colwidth', -1):
/usr/lib/python3/dist-packages/pandas/_config/config.py:407: in __enter__
    _set_option(pat, val, silent=True)
/usr/lib/python3/dist-packages/pandas/_config/config.py:127: in _set_option
    o.validator(v)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

value = -1

    def is_nonnegative_int(value):
        """
        Verify that value is None or a positive int.

        Parameters
        ----------
        value : None or int
                The `value` to be checked.

        Raises
        ------
        ValueError
            When the value is not None or is a negative integer
        """

        if value is None:
            return

        elif isinstance(value, int):
            if value >= 0:
                return

        msg = "Value must be a nonnegative integer or None"
>       raise ValueError(msg)
E       ValueError: Value must be a nonnegative integer or None

/usr/lib/python3/dist-packages/pandas/_config/config.py:844: ValueError
_________________ SummarizeTests.test_phred_score_out_of_range _________________

self = <q2_demux.tests.test_demux.SummarizeTests testMethod=test_phred_score_out_of_range>

    def test_phred_score_out_of_range(self):
        barcodes = self.barcodes[:3]

        sequences = [('@s1/1 abc/1', 'GGG', '+', 'jjj'),
                     ('@s2/1 abc/1', 'CCC', '+', 'iii'),
                     ('@s3/1 abc/1', 'AAA', '+', 'hhh')]
        bsi = BarcodeSequenceFastqIterator(barcodes, sequences)

        barcode_map = pd.Series(
            ['AAAA', 'AACC', 'TTAA'], name='bc',
            index=pd.Index(['sample1', 'sample2', 'sample3'], name='id')
        )
        barcode_map = qiime2.CategoricalMetadataColumn(barcode_map)

        demux_data, ecc = emp_single(bsi, barcode_map,
                                     golay_error_correction=False)
        with tempfile.TemporaryDirectory() as output_dir:
            result = summarize(output_dir, _PlotQualView(demux_data,
> paired=False), n=50)

q2_demux/tests/test_demux.py:1035:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
q2_demux/_summarize/_visualizer.py:169: in summarize
    forward_length_table = _build_seq_len_table(forward_scores)
q2_demux/_summarize/_visualizer.py:109: in _build_seq_len_table
    return q2templates.df_to_html(frame)
/usr/lib/python3/dist-packages/q2templates/util.py:45: in df_to_html
    with pd.option_context('display.max_colwidth', -1):
/usr/lib/python3/dist-packages/pandas/_config/config.py:407: in __enter__
    _set_option(pat, val, silent=True)
/usr/lib/python3/dist-packages/pandas/_config/config.py:127: in _set_option
    o.validator(v)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

value = -1

    def is_nonnegative_int(value):
        """
        Verify that value is None or a positive int.

        Parameters
        ----------
        value : None or int
                The `value` to be checked.

        Raises
        ------
        ValueError
            When the value is not None or is a negative integer
        """

        if value is None:
            return

        elif isinstance(value, int):
            if value >= 0:
                return

        msg = "Value must be a nonnegative integer or None"
>       raise ValueError(msg)
E       ValueError: Value must be a nonnegative integer or None

/usr/lib/python3/dist-packages/pandas/_config/config.py:844: ValueError
__________ SummarizeTests.test_sequence_length_uses_subsample_paired ___________

self = <q2_demux.tests.test_demux.SummarizeTests testMethod=test_sequence_length_uses_subsample_paired>

    def test_sequence_length_uses_subsample_paired(self):
random.seed(6) # Will select s1 and s2 which aren't the shortest pairs

        forward = [('@s1/1 abc/1', 'GGG', '+', 'YYY'),
                   ('@s2/1 abc/1', 'CCCCC', '+', 'PPPPP'),
                   ('@s3/1 abc/1', 'A', '+', 'P'),
                   ('@s4/1 abc/1', 'TTTTTTT', '+', 'PPPPPPP')]
        reverse = [('@s1/1 abc/1', 'AAAAA', '+', 'YYYYY'),
                   ('@s2/1 abc/1', 'TTTTTTT', '+', 'PPPPPPP'),
                   ('@s3/1 abc/1', 'GGG', '+', 'PPP'),
                   ('@s4/1 abc/1', 'C', '+', 'P')]
        bpsi = BarcodePairedSequenceFastqIterator(self.barcodes, forward,
                                                  reverse)

        barcode_map = pd.Series(
            ['AAAA', 'AACC'], name='bc',
            index=pd.Index(['sample1', 'sample2'], name='id')
        )
        barcode_map = qiime2.CategoricalMetadataColumn(barcode_map)

        demux_data, ecc = emp_paired(bpsi, barcode_map,
                                     golay_error_correction=False)
        with tempfile.TemporaryDirectory() as output_dir:
> summarize(output_dir, _PlotQualView(demux_data, paired=True), n=2)

q2_demux/tests/test_demux.py:1164:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
q2_demux/_summarize/_visualizer.py:169: in summarize
    forward_length_table = _build_seq_len_table(forward_scores)
q2_demux/_summarize/_visualizer.py:109: in _build_seq_len_table
    return q2templates.df_to_html(frame)
/usr/lib/python3/dist-packages/q2templates/util.py:45: in df_to_html
    with pd.option_context('display.max_colwidth', -1):
/usr/lib/python3/dist-packages/pandas/_config/config.py:407: in __enter__
    _set_option(pat, val, silent=True)
/usr/lib/python3/dist-packages/pandas/_config/config.py:127: in _set_option
    o.validator(v)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

value = -1

    def is_nonnegative_int(value):
        """
        Verify that value is None or a positive int.

        Parameters
        ----------
        value : None or int
                The `value` to be checked.

        Raises
        ------
        ValueError
            When the value is not None or is a negative integer
        """

        if value is None:
            return

        elif isinstance(value, int):
            if value >= 0:
                return

        msg = "Value must be a nonnegative integer or None"
>       raise ValueError(msg)
E       ValueError: Value must be a nonnegative integer or None

/usr/lib/python3/dist-packages/pandas/_config/config.py:844: ValueError
__________ SummarizeTests.test_sequence_length_uses_subsample_single ___________

self = <q2_demux.tests.test_demux.SummarizeTests testMethod=test_sequence_length_uses_subsample_single>

    def test_sequence_length_uses_subsample_single(self):
random.seed(6) # Will select s1 and s2 which aren't the shortest ones

        sequences = [('@s1/1 abc/1', 'GGGGGGG', '+', 'YYYYYYY'),
                     ('@s2/1 abc/1', 'CCCCC', '+', 'PPPPP'),
                     ('@s3/1 abc/1', 'AAA', '+', 'PPP'),
                     ('@s4/1 abc/1', 'T', '+', 'P')]
        bsi = BarcodeSequenceFastqIterator(self.barcodes, sequences)

        barcode_map = pd.Series(
            ['AAAA', 'AACC'], name='bc',
            index=pd.Index(['sample1', 'sample2'], name='id')
        )
        barcode_map = qiime2.CategoricalMetadataColumn(barcode_map)

        demux_data, ecc = emp_single(bsi, barcode_map,
                                     golay_error_correction=False)
        with tempfile.TemporaryDirectory() as output_dir:
> summarize(output_dir, _PlotQualView(demux_data, paired=False), n=2)

q2_demux/tests/test_demux.py:1131:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
q2_demux/_summarize/_visualizer.py:169: in summarize
    forward_length_table = _build_seq_len_table(forward_scores)
q2_demux/_summarize/_visualizer.py:109: in _build_seq_len_table
    return q2templates.df_to_html(frame)
/usr/lib/python3/dist-packages/q2templates/util.py:45: in df_to_html
    with pd.option_context('display.max_colwidth', -1):
/usr/lib/python3/dist-packages/pandas/_config/config.py:407: in __enter__
    _set_option(pat, val, silent=True)
/usr/lib/python3/dist-packages/pandas/_config/config.py:127: in _set_option
    o.validator(v)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

value = -1

    def is_nonnegative_int(value):
        """
        Verify that value is None or a positive int.

        Parameters
        ----------
        value : None or int
                The `value` to be checked.

        Raises
        ------
        ValueError
            When the value is not None or is a negative integer
        """

        if value is None:
            return

        elif isinstance(value, int):
            if value >= 0:
                return

        msg = "Value must be a nonnegative integer or None"
>       raise ValueError(msg)
E       ValueError: Value must be a nonnegative integer or None

/usr/lib/python3/dist-packages/pandas/_config/config.py:844: ValueError
______________________ SummarizeTests.test_single_sample _______________________

self = <q2_demux.tests.test_demux.SummarizeTests testMethod=test_single_sample>

    def test_single_sample(self):
        bsi = BarcodeSequenceFastqIterator(self.barcodes[:1],
                                           self.sequences[:1])

        barcode_map = pd.Series(
            ['AAAA'], name='bc',
            index=pd.Index(['sample1'], name='id')
        )
        barcode_map = qiime2.CategoricalMetadataColumn(barcode_map)

        demux_data, ecc = emp_single(bsi, barcode_map,
                                     golay_error_correction=False)
        # test that an index.html file is created and that it has size > 0
        with tempfile.TemporaryDirectory() as output_dir:
            # TODO: Remove _PlotQualView wrapper
            result = summarize(output_dir, _PlotQualView(demux_data,
> paired=False), n=1)

q2_demux/tests/test_demux.py:902:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
q2_demux/_summarize/_visualizer.py:169: in summarize
    forward_length_table = _build_seq_len_table(forward_scores)
q2_demux/_summarize/_visualizer.py:109: in _build_seq_len_table
    return q2templates.df_to_html(frame)
/usr/lib/python3/dist-packages/q2templates/util.py:45: in df_to_html
    with pd.option_context('display.max_colwidth', -1):
/usr/lib/python3/dist-packages/pandas/_config/config.py:407: in __enter__
    _set_option(pat, val, silent=True)
/usr/lib/python3/dist-packages/pandas/_config/config.py:127: in _set_option
    o.validator(v)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

value = -1

    def is_nonnegative_int(value):
        """
        Verify that value is None or a positive int.

        Parameters
        ----------
        value : None or int
                The `value` to be checked.

        Raises
        ------
        ValueError
            When the value is not None or is a negative integer
        """

        if value is None:
            return

        elif isinstance(value, int):
            if value >= 0:
                return

        msg = "Value must be a nonnegative integer or None"
>       raise ValueError(msg)
E       ValueError: Value must be a nonnegative integer or None

/usr/lib/python3/dist-packages/pandas/_config/config.py:844: ValueError
_______________ SummarizeTests.test_single_sample_multiple_files _______________

self = <q2_demux.tests.test_demux.SummarizeTests testMethod=test_single_sample_multiple_files>

    def test_single_sample_multiple_files(self):
# Note, this case came up on the QIIME 2 Forum, due to a user running # `summarize` with demuxed sequences that all had the same Sample ID # in the internal MANIFEST file. With versions of seaborn greater than # 0.8.0 this is no longer a problem, but on prior versions, the user
        # would see the following error:
        # TypeError: len() of unsized object
        files = ['sample1_S0_L001_R1_001.fastq.gz',
                 'sample2_S0_L001_R1_001.fastq.gz',
                 'sample3_S0_L001_R1_001.fastq.gz',
                 'MANIFEST', 'metadata.yml']
        for f in files:
            shutil.copy(
                self.get_data_path('single_sample_multiple_files/%s' % f),
                self.temp_dir.name)

        demux_data = SingleLanePerSampleSingleEndFastqDirFmt(
                self.temp_dir.name, mode='r')
        with tempfile.TemporaryDirectory() as output_dir:
            # TODO: Remove _PlotQualView wrapper
            result = summarize(output_dir, _PlotQualView(demux_data,
> paired=False), n=1)

q2_demux/tests/test_demux.py:940:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
q2_demux/_summarize/_visualizer.py:169: in summarize
    forward_length_table = _build_seq_len_table(forward_scores)
q2_demux/_summarize/_visualizer.py:109: in _build_seq_len_table
    return q2templates.df_to_html(frame)
/usr/lib/python3/dist-packages/q2templates/util.py:45: in df_to_html
    with pd.option_context('display.max_colwidth', -1):
/usr/lib/python3/dist-packages/pandas/_config/config.py:407: in __enter__
    _set_option(pat, val, silent=True)
/usr/lib/python3/dist-packages/pandas/_config/config.py:127: in _set_option
    o.validator(v)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

value = -1

    def is_nonnegative_int(value):
        """
        Verify that value is None or a positive int.

        Parameters
        ----------
        value : None or int
                The `value` to be checked.

        Raises
        ------
        ValueError
            When the value is not None or is a negative integer
        """

        if value is None:
            return

        elif isinstance(value, int):
            if value >= 0:
                return

        msg = "Value must be a nonnegative integer or None"
>       raise ValueError(msg)
E       ValueError: Value must be a nonnegative integer or None

/usr/lib/python3/dist-packages/pandas/_config/config.py:844: ValueError
_____________ SummarizeTests.test_subsample_higher_than_seqs_count _____________

self = <q2_demux.tests.test_demux.SummarizeTests testMethod=test_subsample_higher_than_seqs_count>

    def test_subsample_higher_than_seqs_count(self):
        barcodes = self.barcodes[:1]

        sequences = self.sequences[:1]
        bsi = BarcodeSequenceFastqIterator(barcodes, sequences)

        barcode_map = pd.Series(['AAAA'], name='bc',
                                index=pd.Index(['sample1'], name='id'))
        barcode_map = qiime2.CategoricalMetadataColumn(barcode_map)

        demux_data, ecc = emp_single(bsi, barcode_map,
                                     golay_error_correction=False)
        with tempfile.TemporaryDirectory() as output_dir:
            result = summarize(output_dir, _PlotQualView(demux_data,
> paired=False), n=50)

q2_demux/tests/test_demux.py:1010:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
q2_demux/_summarize/_visualizer.py:169: in summarize
    forward_length_table = _build_seq_len_table(forward_scores)
q2_demux/_summarize/_visualizer.py:109: in _build_seq_len_table
    return q2templates.df_to_html(frame)
/usr/lib/python3/dist-packages/q2templates/util.py:45: in df_to_html
    with pd.option_context('display.max_colwidth', -1):
/usr/lib/python3/dist-packages/pandas/_config/config.py:407: in __enter__
    _set_option(pat, val, silent=True)
/usr/lib/python3/dist-packages/pandas/_config/config.py:127: in _set_option
    o.validator(v)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

value = -1

    def is_nonnegative_int(value):
        """
        Verify that value is None or a positive int.

        Parameters
        ----------
        value : None or int
                The `value` to be checked.

        Raises
        ------
        ValueError
            When the value is not None or is a negative integer
        """

        if value is None:
            return

        elif isinstance(value, int):
            if value >= 0:
                return

        msg = "Value must be a nonnegative integer or None"
>       raise ValueError(msg)
E       ValueError: Value must be a nonnegative integer or None

/usr/lib/python3/dist-packages/pandas/_config/config.py:844: ValueError

Reply via email to