<commit_before>import os
import unittest
import pandas as pd
import subprocess

from pyquant.tests import mixins, utils


class ITraqTest(mixins.FileMixins, unittest.TestCase):
    def setUp(self):
        super(ITraqTest, self).setUp()
        self.output = os.path.join(self.out_dir, 'itraq_test')

    @utils.timer
    def test_itraq_processing(self):
        com = [self.executable, '--scan-file', self.itraq_mzml, '-o', self.output, '--precursor-ppm', '200', '--isobaric-tags', '--label-method', 'iTRAQ4']
        subprocess.call(com)
        data = pd.read_table(self.output)
        self.assertListEqual(map(int, data['114 Intensity'].values.tolist()), [1215, 9201, 1218, 83983, 10266, 2995, 7160])
        self.assertListEqual(map(int, data['115 Intensity'].values.tolist()), [1428, 38772, 946, 1161, 12032, 4109, 8421])
        self.assertListEqual(map(int, data['116 Intensity'].values.tolist()), [1031, 15314, 0, 94243, 11381, 3350, 8577])
        self.assertListEqual(map(int, data['117 Intensity'].values.tolist()), [0, 42004, 1032, 383, 14290, 2557, 8969])

if __name__ == '__main__':
    unittest.main()<commit_msg>python3 map junk<commit_after>import os
import unittest
import pandas as pd
import subprocess

from pyquant.tests import mixins, utils


class ITraqTest(mixins.FileMixins, unittest.TestCase):
    def setUp(self):
        super(ITraqTest, self).setUp()
        self.output = os.path.join(self.out_dir, 'itraq_test')

    @utils.timer
    def test_itraq_processing(self):
        com = [self.executable, '--scan-file', self.itraq_mzml, '-o', self.output, '--precursor-ppm', '200', '--isobaric-tags', '--label-method', 'iTRAQ4']
        subprocess.call(com)
        data = pd.read_table(self.output)
        self.assertListEqual([int(i) for i in data['114 Intensity'].values.tolist()], [1215, 9201, 1218, 83983, 10266, 2995, 7160])
        self.assertListEqual([int(i) for i in data['115 Intensity'].values.tolist()], [1428, 38772, 946, 1161, 12032, 4109, 8421])
        self.assertListEqual([int(i) for i in data['116 Intensity'].values.tolist()], [1031, 15314, 0, 94243, 11381, 3350, 8577])
        self.assertListEqual([int(i) for i in data['117 Intensity'].values.tolist()], [0, 42004, 1032, 383, 14290, 2557, 8969])

if __name__ == '__main__':
    unittest.main()
{'fraction_non_alphanumeric': 0.16296296296296298, 'fraction_numerical': 0.11285403050108933, 'mean_word_length': 3.980477223427332, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '401626', 'n_tokens_mistral': 1024, 'n_tokens_neox': 829, 'n_words': 185}