diff --git a/constants/constants.py b/constants/constants.py index c84844e7..e517b0b2 100644 --- a/constants/constants.py +++ b/constants/constants.py @@ -113,7 +113,11 @@ class Constants(object): DATA_SET_GENERIC = "Generic" ## default name for a dataset ### NextClade link - NEXTCLADE_LINK = "https://clades.nextstrain.org/?input-fasta=" + NEXTCLADE_LINK_sars_cov_2 = "https://clades.nextstrain.org/?dataset-name=sars-cov-2&input-fasta=" + NEXTCLADE_LINK_A_H3N2 = "https://clades.nextstrain.org/?dataset-name=flu_h3n2_ha&input-fasta=" + NEXTCLADE_LINK_A_H1N1 = "https://clades.nextstrain.org/?dataset-name=flu_h1n1pdm_ha&input-fasta=" + NEXTCLADE_LINK_B_Yamagata = "https://clades.nextstrain.org/?dataset-name=flu_yam_ha&input-fasta=" + NEXTCLADE_LINK_B_Victoria = "https://clades.nextstrain.org/?dataset-name=flu_vic_ha&input-fasta=" AUSPICE_LINK = "https://auspice.us/" ## NUMBER OF SETs to paginate diff --git a/constants/software_names.py b/constants/software_names.py index bd6a1191..11792d5d 100644 --- a/constants/software_names.py +++ b/constants/software_names.py @@ -96,10 +96,10 @@ class SoftwareNames(object): "Number of reads R1", "Number of reads R2", "Average read length R1", "Average read length R2", "STDEV read length R1", "STDEV read length R2", - "Total bases",] + "Total reads",] SOFTWARE_ILLUMINA_stat_collect_show_percentage = [ "Number of reads R1", "Number of reads R2", - "Total bases",] + "Total reads",] SOFTWARE_RabbitQC = os.path.join(settings.DIR_SOFTWARE, "RabbitQC/rabbit_qc") SOFTWARE_RabbitQC_name = "RabbitQC" diff --git a/deprecated_tests/tests_software_single.py b/deprecated_tests/tests_software_single.py index 1f770cc9..cde82521 100644 --- a/deprecated_tests/tests_software_single.py +++ b/deprecated_tests/tests_software_single.py @@ -63,229 +63,19 @@ def setUp(self): def tearDown(self): pass - @override_settings(MEDIA_ROOT=getattr(settings, "MEDIA_ROOT_TEST", None)) - def test_process_second_stage_analysis_single_file(self): + def test_run_clean_minion_2(self): """ - test global method + Test run fastq and trimmomatic all together """ - self.assertEquals(getattr(settings, "MEDIA_ROOT_TEST", None), getattr(settings, "MEDIA_ROOT", None)) - self.utils.remove_dir(getattr(settings, "MEDIA_ROOT_TEST", None)) - self.utils.make_path(getattr(settings, "MEDIA_ROOT_TEST", None)) - - gb_file = os.path.join(self.baseDirectory, ConstantsTestsCase.MANAGING_DIR, ConstantsTestsCase.MANAGING_FILES_GBK) - fasta_file = os.path.join(self.baseDirectory, ConstantsTestsCase.MANAGING_DIR, ConstantsTestsCase.MANAGING_FILES_FASTA) - file_1 = os.path.join(self.baseDirectory, ConstantsTestsCase.DIR_FASTQ, ConstantsTestsCase.FASTQ1_1) - file_2 = os.path.join(self.baseDirectory, ConstantsTestsCase.DIR_FASTQ, ConstantsTestsCase.FASTQ1_2) - - try: - user = User.objects.get(username=ConstantsTestsCase.TEST_USER_NAME) - except User.DoesNotExist: - user = User() - user.username = ConstantsTestsCase.TEST_USER_NAME - user.is_active = False - user.password = ConstantsTestsCase.TEST_USER_NAME - user.save() - - ref_name = "second_stagis_single_file2" - try: - reference = Reference.objects.get(name=ref_name) - except Reference.DoesNotExist: - reference = Reference() - reference.name = ref_name - reference.reference_fasta.name = fasta_file - reference.reference_fasta_name = os.path.basename(fasta_file) - reference.reference_genbank.name = gb_file - reference.reference_genbank_name = os.path.basename(gb_file) - reference.owner = user - reference.save() - - temp_dir = self.utils.get_temp_dir() - self.utils.copy_file(file_1, os.path.join(temp_dir, ConstantsTestsCase.FASTQ1_1)) - self.utils.copy_file(file_2, os.path.join(temp_dir, ConstantsTestsCase.FASTQ1_2)) - - sample_name = "run_snippyis_single_file1" - try: - sample = Sample.objects.get(name=sample_name) - except Sample.DoesNotExist: - sample = Sample() - sample.name = sample_name - sample.is_valid_1 = True - sample.file_name_1 = ConstantsTestsCase.FASTQ1_1 - sample.path_name_1.name = os.path.join(temp_dir, ConstantsTestsCase.FASTQ1_1) - sample.is_valid_2 = False - sample.file_name_2 = ConstantsTestsCase.FASTQ1_2 - sample.path_name_2.name = os.path.join(temp_dir, ConstantsTestsCase.FASTQ1_2) - sample.set_type_of_fastq_sequencing(Constants.FORMAT_FASTQ_illumina) - sample.owner = user - sample.save() - - project_name = "file_naais_single_filee_3" - try: - project = Project.objects.get(name=project_name) - except Project.DoesNotExist: - project = Project() - project.name = project_name - project.reference = reference - project.owner = user - project.save() - - ## create project_sample - project_sample = ProjectSample() - project_sample.sample = sample - project_sample.project = project - project_sample.save() - - ### copy to trimmomatic files - self.utils.copy_file(file_1, project_sample.sample.get_trimmomatic_file(TypePath.MEDIA_ROOT, True)) - self.utils.copy_file(file_2, project_sample.sample.get_trimmomatic_file(TypePath.MEDIA_ROOT, False)) - - manageDatabase = ManageDatabase() - metaKeyAndValue = MetaKeyAndValue() - meta_key_project_sample = metaKeyAndValue.get_meta_key_queue_by_project_sample_id(project_sample.id) - manageDatabase.set_project_sample_metakey(project_sample, user, meta_key_project_sample, MetaKeyAndValue.META_VALUE_Queue, "meta_sample.description") - self.assertTrue(self.software.process_second_stage_snippy_coverage_freebayes(project_sample, user)) - try: - project_sample = ProjectSample.objects.get(pk=project_sample.id) - except ProjectSample.DoesNotExist: - self.fail("Must exist") - self.assertTrue(project_sample.is_finished) - self.assertTrue(project_sample.is_mask_consensus_sequences) - - ### test the files - self.assertTrue(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_CONSENSUS_FASTA, SoftwareNames.SOFTWARE_SNIPPY_name))) - self.assertFalse(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_CONSENSUS_FA, SoftwareNames.SOFTWARE_SNIPPY_name))) - self.assertTrue(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_CONSENSUS_FASTA, SoftwareNames.SOFTWARE_SNIPPY_name).index(SoftwareNames.SOFTWARE_SNIPPY_name.lower()) != -1) - - self.assertTrue(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_BAM, SoftwareNames.SOFTWARE_SNIPPY_name))) - self.assertTrue(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_BAM_BAI, SoftwareNames.SOFTWARE_SNIPPY_name))) - self.assertFalse(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_DEPTH, SoftwareNames.SOFTWARE_SNIPPY_name))) - self.assertTrue(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_DEPTH_GZ, SoftwareNames.SOFTWARE_SNIPPY_name))) - self.assertTrue(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_DEPTH_GZ_TBI, SoftwareNames.SOFTWARE_SNIPPY_name))) - self.assertTrue(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_VCF, SoftwareNames.SOFTWARE_SNIPPY_name))) - self.assertTrue(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_VCF_GZ, SoftwareNames.SOFTWARE_SNIPPY_name))) - self.assertTrue(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_CSV, SoftwareNames.SOFTWARE_SNIPPY_name))) - self.assertTrue(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_TAB, SoftwareNames.SOFTWARE_SNIPPY_name))) - self.assertTrue(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_REF_FASTA, SoftwareNames.SOFTWARE_SNIPPY_name))) - self.assertTrue(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_REF_FASTA, SoftwareNames.SOFTWARE_SNIPPY_name))) - self.assertTrue(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_REF_FASTA_FAI, SoftwareNames.SOFTWARE_SNIPPY_name))) - - expected_file = os.path.join(self.baseDirectory, ConstantsTestsCase.MANAGING_DIR, "run_snippyis_single_file1.tab") - self.assertTrue(filecmp.cmp(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_TAB, SoftwareNames.SOFTWARE_SNIPPY_name), - expected_file)) - self.assertTrue(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_TAB, SoftwareNames.SOFTWARE_SNIPPY_name))) - - ## freebayes - self.assertTrue(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_VCF, SoftwareNames.SOFTWARE_FREEBAYES_name).index(SoftwareNames.SOFTWARE_FREEBAYES_name.lower()) != -1) - self.assertTrue(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_VCF, SoftwareNames.SOFTWARE_FREEBAYES_name))) - self.assertTrue(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_TAB, SoftwareNames.SOFTWARE_FREEBAYES_name))) - expected_file = os.path.join(self.baseDirectory, ConstantsTestsCase.MANAGING_DIR, "run_freebayes_single_file1.tab") - self.assertTrue(filecmp.cmp(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_TAB, SoftwareNames.SOFTWARE_FREEBAYES_name), - expected_file)) - self.assertTrue(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_VCF_GZ, SoftwareNames.SOFTWARE_FREEBAYES_name))) - - ## test freebayes clean - self.assertTrue(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_TAB, SoftwareNames.SOFTWARE_FREEBAYES_name))) - self.assertTrue(os.path.getsize(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_TAB, SoftwareNames.SOFTWARE_FREEBAYES_name)) > 10) - - ## test consensus file - self.assertTrue(os.path.exists(project_sample.get_consensus_file(TypePath.MEDIA_ROOT))) - self.assertTrue(os.path.getsize(project_sample.get_consensus_file(TypePath.MEDIA_ROOT)) > 10) - self.assertTrue(filecmp.cmp(project_sample.get_consensus_file(TypePath.MEDIA_ROOT), - project_sample.get_backup_consensus_file())) - - ### human file name, snippy tab - self.assertTrue(os.path.exists(project_sample.get_file_output_human(TypePath.MEDIA_ROOT, FileType.FILE_TAB, self.software_names.get_snippy_name()))) - self.assertTrue(os.path.getsize(project_sample.get_file_output_human(TypePath.MEDIA_ROOT, FileType.FILE_TAB, self.software_names.get_snippy_name())) > 10) - - ### set flag that is finished - list_meta = manageDatabase.get_project_sample_metakey(project_sample, MetaKeyAndValue.META_KEY_Count_Hits, None) - self.assertTrue(len(list_meta) == 1) - self.assertEquals(MetaKeyAndValue.META_VALUE_Success, list_meta[0].value) - self.assertEquals(MetaKeyAndValue.META_KEY_Count_Hits, list_meta[0].meta_tag.name) - - ### get the hits value - decode_coverage = DecodeObjects() - count_hits = decode_coverage.decode_result(list_meta[0].description) - self.assertEquals(0, count_hits.get_hits_50_90()) - self.assertEquals(3, count_hits.get_hits_less_50()) - self.assertEquals(3, count_hits.get_total_50_50_90()) - self.assertEquals(125, count_hits.get_total()) - - self.assertEquals(3, project_sample.count_variations.var_less_50) - self.assertEquals(0, project_sample.count_variations.var_bigger_50_90) - self.assertEquals(122, project_sample.count_variations.var_bigger_90) - self.assertEquals(0, project_sample.alert_first_level) - self.assertEquals(0, project_sample.alert_second_level) - - ### test mixed infections - self.assertEquals('0.815100969586423', '{}'.format(project_sample.mixed_infections.average_value)) - self.assertEquals('No', project_sample.mixed_infections.tag.name) - self.assertFalse(project_sample.mixed_infections.has_master_vector) - - list_meta = manageDatabase.get_project_sample_metakey(project_sample, MetaKeyAndValue.META_KEY_Snippy_Freebayes, None) - self.assertEquals(1, len(list_meta)) - self.assertEquals(MetaKeyAndValue.META_VALUE_Success, list_meta[0].value) - self.assertEquals(MetaKeyAndValue.META_KEY_Snippy_Freebayes, list_meta[0].meta_tag.name) - - decode_result = DecodeObjects() - result = decode_result.decode_result(list_meta[0].description) - self.assertTrue(result is not None) - self.assertEquals("Snippy-3.2-dev; (--mapqual 20 --mincov 10 --minfrac 0.51)", result.get_software(self.software_names.get_snippy_name())) - self.assertEquals("Freebayes-v1.1.0-54-g49413aa; (--min-mapping-quality 20 --min-base-quality 20 --min-coverage 100 --min-alternate-count 10 --min-alternate-fraction 0.01 --ploidy 2 -V)",\ - result.get_software(self.software_names.get_freebayes_name())) - self.assertTrue(result.is_software_present(self.software_names.get_freebayes_name())) - self.assertFalse(result.is_software_present(self.software_names.get_trimmomatic_name())) - - meta_value = manageDatabase.get_project_sample_metakey(project_sample, MetaKeyAndValue.META_KEY_Coverage, MetaKeyAndValue.META_VALUE_Success) - decode_coverage = DecodeObjects() - coverage = decode_coverage.decode_result(meta_value.description) - self.assertEqual(coverage.get_coverage('PA', Coverage.COVERAGE_ALL), "527.4") - self.assertEqual(coverage.get_coverage('MP', Coverage.COVERAGE_ALL), "2198.8") - self.assertEqual(coverage.get_coverage('HA', Coverage.COVERAGE_ALL), "1449.3") - self.assertEqual(coverage.get_coverage('PA', Coverage.COVERAGE_MORE_9), "100.0") - self.assertEqual(coverage.get_coverage('MP', Coverage.COVERAGE_MORE_9), "100.0") - self.assertEqual(coverage.get_coverage('HA', Coverage.COVERAGE_MORE_9), "100.0") - self.assertEqual(coverage.get_coverage('PA', Coverage.COVERAGE_MORE_0), "100.0") - self.assertEqual(coverage.get_coverage('MP', Coverage.COVERAGE_MORE_0), "100.0") - self.assertEqual(coverage.get_coverage('HA', Coverage.COVERAGE_MORE_0), "100.0") - - lst_meta_sample = manageDatabase.get_project_sample_metakey(project_sample, meta_key_project_sample, None) - self.assertEquals(2, len(lst_meta_sample)) - self.assertEquals(MetaKeyAndValue.META_VALUE_Queue, lst_meta_sample[1].value) - self.assertEquals(MetaKeyAndValue.META_VALUE_Success, lst_meta_sample[0].value) - - ### check if the images exist - for gene in self.utils.get_elements_from_db(reference, user): - output_image = project_sample.get_global_file_by_element(TypePath.MEDIA_ROOT, ProjectSample.PREFIX_FILE_COVERAGE, gene, FileExtensions.FILE_PNG) - self.assertTrue(os.path.exists(output_image)) - - meta_value = manageDatabase.get_project_sample_metakey_last(project_sample, - MetaKeyAndValue.META_KEY_bam_stats, - MetaKeyAndValue.META_VALUE_Success) - self.assertTrue(not meta_value is None) - result = decode_coverage.decode_result(meta_value.description) - self.assertEqual('87818', result.get_value_by_key(MetaKeyAndValue.SAMTOOLS_flagstat_mapped_reads)) - self.assertEqual('87818', result.get_value_by_key(MetaKeyAndValue.SAMTOOLS_flagstat_total_reads)) - self.assertEqual(None, result.get_value_by_key('xpto')) - - self.utils.remove_dir(temp_dir) - self.utils.remove_dir(getattr(settings, "MEDIA_ROOT", None)) - - - @override_settings(MEDIA_ROOT=getattr(settings, "MEDIA_ROOT_TEST", None)) - def test_process_second_stage_analysis_single_file_no_freebayes(self): - """ - test global method - """ - self.assertEquals(getattr(settings, "MEDIA_ROOT_TEST", None), getattr(settings, "MEDIA_ROOT", None)) - self.utils.remove_dir(getattr(settings, "MEDIA_ROOT_TEST", None)) - self.utils.make_path(getattr(settings, "MEDIA_ROOT_TEST", None)) - - gb_file = os.path.join(self.baseDirectory, ConstantsTestsCase.MANAGING_DIR, ConstantsTestsCase.MANAGING_FILES_GBK) - fasta_file = os.path.join(self.baseDirectory, ConstantsTestsCase.MANAGING_DIR, ConstantsTestsCase.MANAGING_FILES_FASTA) - file_1 = os.path.join(self.baseDirectory, ConstantsTestsCase.DIR_FASTQ, ConstantsTestsCase.FASTQ1_1) - file_2 = os.path.join(self.baseDirectory, ConstantsTestsCase.DIR_FASTQ, ConstantsTestsCase.FASTQ1_2) - + uploadFiles = UploadFiles() + to_test = True + (version, file) = uploadFiles.get_file_to_upload(to_test) + self.assertEqual("2", version) + self.assertEqual(os.path.join(self.baseDirectory, "db/type_identification/test_db_influenza_typing_v2.fasta"), file) + uploadFiles.upload_file(version, file) ## upload file + + file_name = os.path.join(self.baseDirectory, ConstantsTestsCase.DIR_FASTQ, "covid/test_minion_seq.fastq.gz") + self.assertTrue(file_name) try: user = User.objects.get(username=ConstantsTestsCase.TEST_USER_NAME) except User.DoesNotExist: @@ -295,24 +85,10 @@ def test_process_second_stage_analysis_single_file_no_freebayes(self): user.password = ConstantsTestsCase.TEST_USER_NAME user.save() - ref_name = "second_stagis_single_file2" - try: - reference = Reference.objects.get(name=ref_name) - except Reference.DoesNotExist: - reference = Reference() - reference.name = ref_name - reference.reference_fasta.name = fasta_file - reference.reference_fasta_name = os.path.basename(fasta_file) - reference.reference_genbank.name = gb_file - reference.reference_genbank_name = os.path.basename(gb_file) - reference.owner = user - reference.save() - temp_dir = self.utils.get_temp_dir() - self.utils.copy_file(file_1, os.path.join(temp_dir, ConstantsTestsCase.FASTQ1_1)) - self.utils.copy_file(file_2, os.path.join(temp_dir, ConstantsTestsCase.FASTQ1_2)) + self.utils.copy_file(file_name, os.path.join(temp_dir, ConstantsTestsCase.FASTQ1_1)) - sample_name = "run_snippyis_single_file1" + sample_name = "run_nanofilt" try: sample = Sample.objects.get(name=sample_name) except Sample.DoesNotExist: @@ -322,199 +98,163 @@ def test_process_second_stage_analysis_single_file_no_freebayes(self): sample.file_name_1 = ConstantsTestsCase.FASTQ1_1 sample.path_name_1.name = os.path.join(temp_dir, ConstantsTestsCase.FASTQ1_1) sample.is_valid_2 = False - sample.file_name_2 = ConstantsTestsCase.FASTQ1_2 - sample.path_name_2.name = os.path.join(temp_dir, ConstantsTestsCase.FASTQ1_2) - sample.set_type_of_fastq_sequencing(Constants.FORMAT_FASTQ_illumina) + sample.type_of_fastq = Sample.TYPE_OF_FASTQ_minion sample.owner = user sample.save() - - project_name = "file_naais_single_filee_3" - try: - project = Project.objects.get(name=project_name) - except Project.DoesNotExist: - project = Project() - project.name = project_name - project.reference = reference - project.owner = user - project.save() - - ## create project_sample - project_sample = ProjectSample() - project_sample.sample = sample - project_sample.project = project - project_sample.save() - ### copy to trimmomatic files, don't copy trimmommatic files to project - ##self.utils.copy_file(file_1, project_sample.sample.get_trimmomatic_file(TypePath.MEDIA_ROOT, True)) - ##self.utils.copy_file(file_2, project_sample.sample.get_trimmomatic_file(TypePath.MEDIA_ROOT, False)) - - ### turn off freebayes + ### turn off abricate default_software = DefaultSoftware() default_software.test_all_defaults(user) - self.assertTrue(default_software.is_software_to_run(SoftwareNames.SOFTWARE_FREEBAYES_name, - user, ConstantsSettings.TECHNOLOGY_illumina)) - ### turn off freebayes + self.assertTrue(default_software.is_software_to_run(SoftwareNames.SOFTWARE_ABRICATE_name, + user, ConstantsSettings.TECHNOLOGY_minion)) is_to_run = False - default_software.set_software_to_run(SoftwareNames.SOFTWARE_FREEBAYES_name, user, - ConstantsSettings.TECHNOLOGY_illumina, is_to_run) - self.assertFalse(default_software.is_software_to_run(SoftwareNames.SOFTWARE_FREEBAYES_name, - user, ConstantsSettings.TECHNOLOGY_illumina)) - ### set mincov 30 for snippy + default_software.set_software_to_run(SoftwareNames.SOFTWARE_ABRICATE_name, user, + ConstantsSettings.TECHNOLOGY_minion, is_to_run) + self.assertFalse(default_software.is_software_to_run(SoftwareNames.SOFTWARE_ABRICATE_name, + user, ConstantsSettings.TECHNOLOGY_minion)) + + b_make_identify_species = False + self.assertTrue(self.software_minion.run_clean_minion(sample, user, b_make_identify_species)) + default_project_software = DefaultProjectSoftware() + self.assertFalse(default_project_software.is_to_run_abricate(user, sample, + ConstantsSettings.TECHNOLOGY_minion)) + try: - software = SoftwareSettings.objects.get(name=SoftwareNames.SOFTWARE_SNIPPY_name, owner=user, - type_of_use = SoftwareSettings.TYPE_OF_USE_global, - technology__name = ConstantsSettings.TECHNOLOGY_illumina) - self.assertTrue(software.is_used_in_global()) + software = SoftwareSettings.objects.get(name=SoftwareNames.SOFTWARE_NanoFilt_name, owner=user,\ + type_of_use = SoftwareSettings.TYPE_OF_USE_sample, + technology__name = ConstantsSettings.TECHNOLOGY_minion, + is_obsolete = False) except SoftwareSettings.DoesNotExist: - self.fail("Must exist this software name") + self.fail("Must must exist") parameters = Parameter.objects.filter(software=software) - self.assertTrue(3, len(parameters)) + self.assertTrue(5, len(parameters)) + for parameter in parameters: + if (parameter.name == "-q"): + parameter.parameter = "5" + parameter.save() + break + + tag_name_mixed= "No" + sample = Sample.objects.get(name=sample_name) + if (b_make_identify_species): + self.fail("Must have b_make_identify_species FALSE") + self.assertEqual(tag_name_mixed, sample.mixed_infections_tag.name) + self.assertEqual("A-H5N5", sample.type_subtype) + + sample.mixed_infections_tag = None + sample.save() + + sample = Sample.objects.get(name=sample_name) + self.assertEqual(None, sample.mixed_infections_tag) + + try: + mixed_infections_tag = MixedInfectionsTag.objects.get(name=tag_name_mixed) + except MixedInfectionsTag.DoesNotExist as e: + self.fail("Must have tag mixed") + + if (not sample.mixed_infections_tag is None): sample.mixed_infections_tag.delete() + else: + self.assertEqual(Constants.EMPTY_VALUE_NA, sample.mixed_infections_tag.name) + self.assertEqual(Constants.EMPTY_VALUE_NA, sample.type_subtype) + + self.assertEqual(0, sample.number_alerts) + + ### run again + default_project_software.set_abricate_to_run(user, sample, + ConstantsSettings.TECHNOLOGY_minion, True) + ## global + self.assertFalse(default_software.is_software_to_run(SoftwareNames.SOFTWARE_ABRICATE_name, + user, ConstantsSettings.TECHNOLOGY_minion)) + ### project sample + self.assertTrue(default_project_software.is_to_run_abricate(user, + sample, ConstantsSettings.TECHNOLOGY_minion)) + self.assertTrue(self.software_minion.run_clean_minion(sample, user, + default_project_software.is_to_run_abricate(user, + sample, ConstantsSettings.TECHNOLOGY_minion) )) - ### test set default - self.assertEqual("10", parameters[1].parameter) - parameter = parameters[1] - parameter.parameter = 5 - parameter.save() - self.assertEqual("--mapqual 20 --mincov 5 --minfrac 0.51", default_software.get_snippy_parameters(user)) + parameters = Parameter.objects.filter(software=software) + self.assertTrue(5, len(parameters)) + for parameter in parameters: + if (parameter.name == "-q"): + self.assertEqual("5", parameter.parameter) + break; + + self.assertTrue(os.path.exists(os.path.join(temp_dir, os.path.basename(sample.get_fastq(TypePath.MEDIA_ROOT, True))))) + self.assertTrue(os.path.exists(os.path.join(temp_dir, Constants.DIR_PROCESSED_PROCESSED, os.path.basename(sample.get_nanofilt_file(TypePath.MEDIA_ROOT))))) + self.assertTrue(os.path.exists(os.path.join(temp_dir, os.path.basename(sample.get_rabbitQC_output(TypePath.MEDIA_ROOT))))) + self.assertTrue(os.path.exists(os.path.join(temp_dir, Constants.DIR_PROCESSED_PROCESSED, os.path.basename(sample.get_rabbitQC_nanofilt(TypePath.MEDIA_ROOT))))) - default_software_project = DefaultProjectSoftware() - default_software_project.test_all_defaults(user, project, None, None) ## the user can have defaults yet - default_software_project.test_default_db(SoftwareNames.SOFTWARE_FREEBAYES_name, user, - SoftwareSettings.TYPE_OF_USE_project_sample, - None, project_sample, None, ConstantsSettings.TECHNOLOGY_illumina) - - ## test if it is necessary to run freebayes - self.assertFalse(default_software_project.is_to_run_freebayes(user, project_sample)) - manageDatabase = ManageDatabase() - metaKeyAndValue = MetaKeyAndValue() - meta_key_project_sample = metaKeyAndValue.get_meta_key_queue_by_project_sample_id(project_sample.id) - manageDatabase.set_project_sample_metakey(project_sample, user, meta_key_project_sample, MetaKeyAndValue.META_VALUE_Queue, "meta_sample.description") - self.assertTrue(self.software.process_second_stage_snippy_coverage_freebayes(project_sample, user)) - ## test if freebays run - default_project_software = DefaultProjectSoftware() - self.assertFalse(default_project_software.is_to_run_freebayes(user, project_sample)) - - try: - project_sample = ProjectSample.objects.get(pk=project_sample.id) - except ProjectSample.DoesNotExist: - self.fail("Must exist") - self.assertTrue(project_sample.is_finished) - self.assertTrue(project_sample.is_mask_consensus_sequences) - - ### test the files - self.assertTrue(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_CONSENSUS_FASTA, SoftwareNames.SOFTWARE_SNIPPY_name))) - self.assertFalse(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_CONSENSUS_FA, SoftwareNames.SOFTWARE_SNIPPY_name))) - self.assertTrue(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_CONSENSUS_FASTA, SoftwareNames.SOFTWARE_SNIPPY_name).index(SoftwareNames.SOFTWARE_SNIPPY_name.lower()) != -1) - - self.assertTrue(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_BAM, SoftwareNames.SOFTWARE_SNIPPY_name))) - self.assertTrue(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_BAM_BAI, SoftwareNames.SOFTWARE_SNIPPY_name))) - self.assertFalse(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_DEPTH, SoftwareNames.SOFTWARE_SNIPPY_name))) - self.assertTrue(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_DEPTH_GZ, SoftwareNames.SOFTWARE_SNIPPY_name))) - self.assertTrue(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_DEPTH_GZ_TBI, SoftwareNames.SOFTWARE_SNIPPY_name))) - self.assertTrue(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_VCF, SoftwareNames.SOFTWARE_SNIPPY_name))) - self.assertTrue(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_VCF_GZ, SoftwareNames.SOFTWARE_SNIPPY_name))) - self.assertTrue(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_CSV, SoftwareNames.SOFTWARE_SNIPPY_name))) - self.assertTrue(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_TAB, SoftwareNames.SOFTWARE_SNIPPY_name))) - self.assertTrue(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_REF_FASTA, SoftwareNames.SOFTWARE_SNIPPY_name))) - self.assertTrue(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_REF_FASTA, SoftwareNames.SOFTWARE_SNIPPY_name))) - self.assertTrue(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_REF_FASTA_FAI, SoftwareNames.SOFTWARE_SNIPPY_name))) - - expected_file = os.path.join(self.baseDirectory, ConstantsTestsCase.MANAGING_DIR, "run_snippyis_single_file1.tab") - self.assertTrue(filecmp.cmp(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_TAB, SoftwareNames.SOFTWARE_SNIPPY_name), - expected_file)) - self.assertTrue(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_TAB, SoftwareNames.SOFTWARE_SNIPPY_name))) - - ## freebayes - self.assertTrue(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_VCF, SoftwareNames.SOFTWARE_FREEBAYES_name).index(SoftwareNames.SOFTWARE_FREEBAYES_name.lower()) != -1) - self.assertFalse(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_VCF, SoftwareNames.SOFTWARE_FREEBAYES_name))) - self.assertFalse(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_TAB, SoftwareNames.SOFTWARE_FREEBAYES_name))) - expected_file = os.path.join(self.baseDirectory, ConstantsTestsCase.MANAGING_DIR, "run_freebayes_single_file1.tab") - self.assertFalse(os.path.exists(project_sample.get_file_output(TypePath.MEDIA_ROOT, FileType.FILE_VCF_GZ, SoftwareNames.SOFTWARE_FREEBAYES_name))) - - ## test consensus file - self.assertTrue(os.path.exists(project_sample.get_consensus_file(TypePath.MEDIA_ROOT))) - self.assertTrue(os.path.getsize(project_sample.get_consensus_file(TypePath.MEDIA_ROOT)) > 10) - self.assertTrue(filecmp.cmp(project_sample.get_consensus_file(TypePath.MEDIA_ROOT), - project_sample.get_backup_consensus_file())) + list_meta = manageDatabase.get_sample_metakey(sample, MetaKeyAndValue.META_KEY_Number_And_Average_Reads, None) + self.assertEqual(2, len(list_meta)) + self.assertEquals(MetaKeyAndValue.META_VALUE_Success, list_meta[0].value) + self.assertEquals(MetaKeyAndValue.META_KEY_Number_And_Average_Reads, list_meta[0].meta_tag.name) + + decodeResultAverageAndNumberReads = DecodeObjects() + result_average = decodeResultAverageAndNumberReads.decode_result(list_meta[0].description) + self.assertEqual('3000', result_average.number_file_1) + self.assertEqual('1158.4', result_average.average_file_1) + self.assertEqual(None, result_average.number_file_2) + self.assertEqual(None, result_average.average_file_2) - ### human file name, snippy tab - self.assertTrue(os.path.exists(project_sample.get_file_output_human(TypePath.MEDIA_ROOT, FileType.FILE_TAB, self.software_names.get_snippy_name()))) - self.assertTrue(os.path.getsize(project_sample.get_file_output_human(TypePath.MEDIA_ROOT, FileType.FILE_TAB, self.software_names.get_snippy_name())) > 10) - - ### set flag that is finished - list_meta = manageDatabase.get_project_sample_metakey(project_sample, MetaKeyAndValue.META_KEY_Count_Hits, None) - self.assertTrue(len(list_meta) == 1) + list_meta = manageDatabase.get_sample_metakey(sample, MetaKeyAndValue.META_KEY_Fastq_Trimmomatic, None) + self.assertTrue(len(list_meta) == 0) + list_meta = manageDatabase.get_sample_metakey(sample, MetaKeyAndValue.META_KEY_NanoStat_NanoFilt, None) + self.assertEqual(2, len(list_meta)) self.assertEquals(MetaKeyAndValue.META_VALUE_Success, list_meta[0].value) - self.assertEquals(MetaKeyAndValue.META_KEY_Count_Hits, list_meta[0].meta_tag.name) + self.assertEquals(MetaKeyAndValue.META_KEY_NanoStat_NanoFilt, list_meta[0].meta_tag.name) + self.assertEquals("Success, NanoStat(1.4.0), NanoFilt(2.6.0)", list_meta[0].description) + self.assertEquals("Success, NanoStat(1.4.0), NanoFilt(2.6.0)", list_meta[1].description) - ### get the hits value - decode_coverage = DecodeObjects() - count_hits = decode_coverage.decode_result(list_meta[0].description) - self.assertEquals(0, count_hits.get_hits_50_90()) - self.assertEquals(0, count_hits.get_hits_less_50()) - self.assertEquals(0, count_hits.get_total_50_50_90()) - self.assertEquals(0, count_hits.get_total()) - - self.assertEquals(0, project_sample.count_variations.var_less_50) - self.assertEquals(0, project_sample.count_variations.var_bigger_50_90) - self.assertEquals(0, project_sample.count_variations.var_bigger_90) - self.assertEquals(0, project_sample.alert_first_level) - self.assertEquals(0, project_sample.alert_second_level) - - ### test mixed infections - self.assertEquals(Constants.EMPTY_VALUE_NA, project_sample.mixed_infections.tag.name) + list_meta = manageDatabase.get_sample_metakey(sample, MetaKeyAndValue.META_KEY_NanoStat_NanoFilt_Software, None) + self.assertEqual(2, len(list_meta)) + self.assertEquals(MetaKeyAndValue.META_VALUE_Success, list_meta[0].value) + self.assertEquals(MetaKeyAndValue.META_KEY_NanoStat_NanoFilt_Software, list_meta[0].meta_tag.name) + result_data = decodeResultAverageAndNumberReads.decode_result(list_meta[0].description) + vect_soft = result_data.get_list_software_instance(self.software_names.get_NanoStat_name()) + self.assertEqual(2, len(vect_soft)) + + self.assertEqual("Mean read length", vect_soft[0].get_vect_key_values()[0].key) + self.assertEqual("1,298.4", vect_soft[0].get_vect_key_values()[0].value) + self.assertEqual("Total bases", vect_soft[0].get_vect_key_values()[-1].key) + self.assertEqual("3,895,144.0", vect_soft[0].get_vect_key_values()[-1].value) + self.assertEqual("Mean read length", vect_soft[1].get_vect_key_values()[0].key) + self.assertEqual("1,158.4", vect_soft[1].get_vect_key_values()[0].value) + self.assertEqual("Total bases", vect_soft[1].get_vect_key_values()[-1].key) + self.assertEqual("3,475,144.0", vect_soft[1].get_vect_key_values()[-1].value) + + stats_illumina, total_reads = self.software.get_stats_from_sample_reads(sample) + self.assertEqual('Mean read length', stats_illumina[0][0]) + self.assertEqual('1,298.4', stats_illumina[0][1]) + self.assertEqual(3000, total_reads) + + sample = Sample.objects.get(name=sample_name) + self.assertEqual("A-H5N5", sample.type_subtype) + # self.assertEqual("H5N5", sample.type_subtype) + self.assertEqual("No", sample.mixed_infections_tag.name) + self.assertEqual(0, sample.number_alerts) + + list_meta = manageDatabase.get_sample_metakey(sample, MetaKeyAndValue.META_KEY_NanoStat_NanoFilt, None) + self.assertEquals(2, len(list_meta)) + self.assertEquals(MetaKeyAndValue.META_VALUE_Success, list_meta[0].value) + self.assertEquals("Success, NanoStat(1.4.0), NanoFilt(2.6.0)", list_meta[0].description) - list_meta = manageDatabase.get_project_sample_metakey(project_sample, MetaKeyAndValue.META_KEY_Snippy_Freebayes, None) - self.assertEquals(1, len(list_meta)) + ### software + list_meta = manageDatabase.get_sample_metakey(sample, MetaKeyAndValue.META_KEY_NanoStat_NanoFilt_Software, None) + self.assertEquals(2, len(list_meta)) self.assertEquals(MetaKeyAndValue.META_VALUE_Success, list_meta[0].value) - self.assertEquals(MetaKeyAndValue.META_KEY_Snippy_Freebayes, list_meta[0].meta_tag.name) + self.assertEquals(MetaKeyAndValue.META_KEY_NanoStat_NanoFilt_Software, list_meta[0].meta_tag.name) decode_result = DecodeObjects() result = decode_result.decode_result(list_meta[0].description) - self.assertTrue(result is not None) - self.assertEquals("Snippy-3.2-dev; (--mapqual 20 --mincov 5 --minfrac 0.51)", result.get_software(self.software_names.get_snippy_name())) - self.assertEquals("MSA Masker-1.0; (--c 4; for coverages less than 5 in 30% of the regions.)", result.get_software(self.software_names.get_msa_masker_name())) - self.assertEquals("", result.get_software(self.software_names.get_freebayes_name())) - self.assertTrue(result.is_software_present(self.software_names.get_snippy_name())) - self.assertFalse(result.is_software_present(self.software_names.get_freebayes_name())) - self.assertFalse(result.is_software_present(self.software_names.get_trimmomatic_name())) - - meta_value = manageDatabase.get_project_sample_metakey(project_sample, MetaKeyAndValue.META_KEY_Coverage, MetaKeyAndValue.META_VALUE_Success) - decode_coverage = DecodeObjects() - coverage = decode_coverage.decode_result(meta_value.description) - self.assertEqual(coverage.get_coverage('PA', Coverage.COVERAGE_ALL), "527.4") - self.assertEqual(coverage.get_coverage('MP', Coverage.COVERAGE_ALL), "2198.8") - self.assertEqual(coverage.get_coverage('HA', Coverage.COVERAGE_ALL), "1449.3") - self.assertEqual(coverage.get_coverage('PA', Coverage.COVERAGE_MORE_9), "100.0") - self.assertEqual(coverage.get_coverage('MP', Coverage.COVERAGE_MORE_9), "100.0") - self.assertEqual(coverage.get_coverage('HA', Coverage.COVERAGE_MORE_9), "100.0") - self.assertEqual(coverage.get_coverage('PA', Coverage.COVERAGE_MORE_0), "100.0") - self.assertEqual(coverage.get_coverage('MP', Coverage.COVERAGE_MORE_0), "100.0") - self.assertEqual(coverage.get_coverage('HA', Coverage.COVERAGE_MORE_0), "100.0") - - lst_meta_sample = manageDatabase.get_project_sample_metakey(project_sample, meta_key_project_sample, None) - self.assertEquals(2, len(lst_meta_sample)) - self.assertEquals(MetaKeyAndValue.META_VALUE_Queue, lst_meta_sample[1].value) - self.assertEquals(MetaKeyAndValue.META_VALUE_Success, lst_meta_sample[0].value) - - ### check if the images exist - for gene in self.utils.get_elements_from_db(reference, user): - output_image = project_sample.get_global_file_by_element(TypePath.MEDIA_ROOT, ProjectSample.PREFIX_FILE_COVERAGE, gene, FileExtensions.FILE_PNG) - self.assertTrue(os.path.exists(output_image)) - - meta_value = manageDatabase.get_project_sample_metakey_last(project_sample, - MetaKeyAndValue.META_KEY_bam_stats, - MetaKeyAndValue.META_VALUE_Success) - self.assertTrue(not meta_value is None) - decode_masking_vcf = DecodeObjects() - result = decode_masking_vcf.decode_result(meta_value.description) - self.assertEqual('87818', result.get_value_by_key(MetaKeyAndValue.SAMTOOLS_flagstat_mapped_reads)) - self.assertEqual('87818', result.get_value_by_key(MetaKeyAndValue.SAMTOOLS_flagstat_total_reads)) - self.assertEqual(None, result.get_value_by_key('xpto')) - - self.utils.remove_dir(temp_dir) - self.utils.remove_dir(getattr(settings, "MEDIA_ROOT", None)) - - + self.assertTrue(not result is None) + self.assertEquals("NanoStat-1.4.0", + result.get_software(self.software_names.get_NanoStat_name())) + self.assertEquals("NanoFilt-2.6.0; (-q 5 -l 50 --headcrop 70 --tailcrop 70)",\ + result.get_software(self.software_names.get_NanoFilt_name())) + self.assertEquals("RabbitQC-0.0.1; (-w 3 -D)",\ + result.get_software(self.software_names.get_rabbitQC_name())) + + ## remove all files + cmd = "rm -r %s*" % (temp_dir); os.system(cmd) \ No newline at end of file diff --git a/fluwebvirus/settings.py b/fluwebvirus/settings.py index f3afa2fc..e33ea9ec 100644 --- a/fluwebvirus/settings.py +++ b/fluwebvirus/settings.py @@ -250,6 +250,8 @@ DATE_FORMAT_FOR_TABLE = '%d-%m-%Y' DATETIME_FORMAT_FOR_TABLE = '%d-%m-%Y %H:%M' +DATE_FORMAT_FOR_SHOW = '%Y-%m-%d' +DATETIME_FORMAT_FOR_TABLE_SHOW = '%Y-%m-%d %H:%M' DATETIME_FORMAT = '%d-%m-%Y %H:%M' DATETIME_INPUT_FORMATS = ['%d-%m-%Y', '%d/%m/%Y'] ## it's necessary to look which kind of date is returned from forms to correct the format diff --git a/fluwebvirus/settings_test.py b/fluwebvirus/settings_test.py index c3e11d46..054dc930 100644 --- a/fluwebvirus/settings_test.py +++ b/fluwebvirus/settings_test.py @@ -230,6 +230,8 @@ DATE_FORMAT_FOR_TABLE = '%d-%m-%Y' DATETIME_FORMAT_FOR_TABLE = '%d-%m-%Y %H:%M' +DATE_FORMAT_FOR_SHOW = '%Y-%m-%d' +DATETIME_FORMAT_FOR_TABLE_SHOW = '%Y-%m-%d %H:%M' DATETIME_FORMAT = '%d-%m-%Y %H:%M' DATETIME_INPUT_FORMATS = ['%d-%m-%Y', '%d/%m/%Y'] ## it's necessary to look which kind of date is returned from forms to correct the format diff --git a/managing_files/management/commands/collect_global_files.py b/managing_files/management/commands/collect_global_files.py index a13b55f9..e8c30e42 100644 --- a/managing_files/management/commands/collect_global_files.py +++ b/managing_files/management/commands/collect_global_files.py @@ -7,7 +7,7 @@ from managing_files.models import Project from utils.collect_extra_data import CollectExtraData from django.contrib.auth.models import User -import logging +import logging, datetime class Command(BaseCommand): ''' @@ -38,12 +38,15 @@ def handle(self, *args, **options): self.stdout.write("Starting for project_id: " + str(project_id)) self.logger_production.info("Starting for project_id: " + str(project_id)) self.logger_debug.info("Starting for project_id: " + str(project_id)) - - print(list(Project.objects.all())) try: project = Project.objects.get(pk=project_id) if (user_id == None): user = project.owner else: user = User.objects.get(pk=user_id) + + ### change date + project.last_change_date = datetime.datetime.now() + project.save() + collect_extra_data.collect_extra_data_for_project(project, user) self.stdout.write("End") except Project.DoesNotExist as e: diff --git a/managing_files/models.py b/managing_files/models.py index a2e69964..418df48f 100644 --- a/managing_files/models.py +++ b/managing_files/models.py @@ -788,6 +788,8 @@ class Project(models.Model): PERCENTAGE_validated_minor_variants = 51 ## only pass <= 50 PROJECT_FILE_NAME_SAMPLE_RESULT_TSV = "Sample_list.tsv" ### first column ID instead of 'sample name' to be compatible with Phandango e Microreact PROJECT_FILE_NAME_SAMPLE_RESULT_CSV = "Sample_list.csv" ### first column ID instead of 'sample name' to be compatible with Phandango e Microreact + PROJECT_FILE_NAME_SAMPLE_RESULT_SETTINGS_TSV = "Sample_list_settings.tsv" ### first column ID instead of 'sample name' to be compatible with Phandango e Microreact + PROJECT_FILE_NAME_SAMPLE_RESULT_SETTINGS_CSV = "Sample_list_settings.csv" ### first column ID instead of 'sample name' to be compatible with Phandango e Microreact PROJECT_FILE_NAME_SAMPLE_RESULT_CSV_simple = "Sample_list_simple.csv" ### first column must be ID because of manging_files.ajax_views.show_phylo_canvas ### this file is only used for to show the manging_files.views.ShowSampleProjectsView PROJECT_FILE_NAME_SAMPLE_RESULT_json = "Sample_list_simple.json" ### first column ID instead of 'sample name' to be compatible with Phandango e Microreact, to download to @@ -796,6 +798,8 @@ class Project(models.Model): PROJECT_FILE_NAME_Pangolin_lineage = "PangolinLineage.csv" ### has the result of pangolin lineage + PROJECT_FILE_NAME_all_files_zipped = "AllFiles.zip" ### Several files zipped + ## put the type file here to clean if there isn't enough sequences to create the trees and alignments vect_clean_file = [PROJECT_FILE_NAME_MAFFT, PROJECT_FILE_NAME_FASTTREE,\ PROJECT_FILE_NAME_FASTTREE_tree,\ @@ -877,6 +881,9 @@ def _clean_name(self, name_to_clean, dict_to_clean = { ' ' : '_', '(' : '', ')' name_to_clean = name_to_clean.replace(key, dict_to_clean[key]) return name_to_clean + def get_clean_project_name(self): + return self._clean_name(self.name) + def get_global_file_by_project(self, type_path, file_name): """ type_path: constants.TypePath -> MEDIA_ROOT, MEDIA_URL diff --git a/managing_files/views.py b/managing_files/views.py index 6a8e0fda..52d75ae8 100644 --- a/managing_files/views.py +++ b/managing_files/views.py @@ -1,6 +1,7 @@ # Create your views here. import ntpath, os, logging, sys +from datetime import datetime from django.views import generic from braces.views import LoginRequiredMixin, FormValidMessageMixin from django.urls import reverse_lazy @@ -41,6 +42,7 @@ from django.template.defaultfilters import filesizeformat from settings.constants_settings import ConstantsSettings from settings.models import Software as SoftwareSettings +from utils.support_django_template import get_link_for_dropdown_item # http://www.craigderington.me/generic-list-view-with-django-tables/ @@ -254,16 +256,12 @@ def get_context_data(self, **kwargs): ## list of all samples in CSV and TSV csv_file = self.utils.get_sample_list_by_user(self.request.user.id, "MEDIA_ROOT", FileExtensions.FILE_CSV) if os.path.exists(csv_file): - context['list_samples_file_csv'] = mark_safe(' Download - ' +\ - os.path.basename(csv_file) + '') + context['list_samples_file_csv'] = get_link_for_dropdown_item( + self.utils.get_sample_list_by_user(self.request.user.id, "MEDIA_URL", FileExtensions.FILE_CSV)) tsv_file = self.utils.get_sample_list_by_user(self.request.user.id, "MEDIA_ROOT", FileExtensions.FILE_TSV) if os.path.exists(tsv_file): - context['list_samples_file_tsv'] = mark_safe(' Download - ' +\ - os.path.basename(tsv_file) + '') + context['list_samples_file_tsv'] = get_link_for_dropdown_item( + self.utils.get_sample_list_by_user(self.request.user.id, "MEDIA_URL", FileExtensions.FILE_TSV)) context['table'] = table context['nav_sample'] = True @@ -1020,7 +1018,7 @@ def get_context_data(self, **kwargs): context['href_trimmonatic_quality_2'] = "Not available" #### data from illumina stat - stat_data = self.software.get_stats_from_sample_reads(sample) + stat_data, total_reads = self.software.get_stats_from_sample_reads(sample) if not stat_data is None: context['data_illuminastat'] = stat_data else: ### other like Minion @@ -1036,7 +1034,7 @@ def get_context_data(self, **kwargs): else: context['href_trimmonatic_quality_1'] = "Not available" #### data from nanoStat - stat_data = self.software.get_stats_from_sample_reads(sample) + stat_data, total_reads = self.software.get_stats_from_sample_reads(sample) if not stat_data is None: context['data_nanostat'] = stat_data ### software @@ -1598,9 +1596,43 @@ def get_context_data(self, **kwargs): ## Files context['coverage_file'] = project.get_global_file_by_project_web(Project.PROJECT_FILE_NAME_COVERAGE) context['main_variations_snippy_file'] = project.get_global_file_by_project_web(Project.PROJECT_FILE_NAME_TAB_VARIATIONS_SNIPPY) - context['sample_file_result_csv'] = project.get_global_file_by_project_web(Project.PROJECT_FILE_NAME_SAMPLE_RESULT_CSV) - context['sample_file_result_tsv'] = project.get_global_file_by_project_web(Project.PROJECT_FILE_NAME_SAMPLE_RESULT_TSV) - context['sample_file_all_consensus'] = project.get_global_file_by_project_web(Project.PROJECT_FILE_NAME_SAMPLE_RESULT_all_consensus) + + ## coverage + if os.path.exists(project.get_global_file_by_project(TypePath.MEDIA_ROOT, Project.PROJECT_FILE_NAME_COVERAGE)): + context['samples_file_coverage'] = get_link_for_dropdown_item( + project.get_global_file_by_project(TypePath.MEDIA_URL, Project.PROJECT_FILE_NAME_COVERAGE)) + ## variants + if os.path.exists(project.get_global_file_by_project(TypePath.MEDIA_ROOT, Project.PROJECT_FILE_NAME_TAB_VARIATIONS_SNIPPY)): + context['samples_file_variants'] = get_link_for_dropdown_item( + project.get_global_file_by_project(TypePath.MEDIA_URL, Project.PROJECT_FILE_NAME_TAB_VARIATIONS_SNIPPY)) + ## minor intra host + if os.path.exists(project.get_global_file_by_project(TypePath.MEDIA_ROOT, Project.PROJECT_FILE_NAME_TAB_VARIATIONS_FREEBAYES)): + context['samples_file_minor_intra_host'] = get_link_for_dropdown_item( + project.get_global_file_by_project(TypePath.MEDIA_URL, Project.PROJECT_FILE_NAME_TAB_VARIATIONS_FREEBAYES)) + ## all files zipped + if os.path.exists(project.get_global_file_by_project(TypePath.MEDIA_ROOT, Project.PROJECT_FILE_NAME_all_files_zipped)): + context['download_all_files'] = get_link_for_dropdown_item( + project.get_global_file_by_project(TypePath.MEDIA_URL, Project.PROJECT_FILE_NAME_all_files_zipped), + "{}_{}_{}".format(os.path.splitext(Project.PROJECT_FILE_NAME_all_files_zipped)[0], + project.get_clean_project_name(), datetime.now().strftime(settings.DATE_FORMAT_FOR_SHOW))) + + + if os.path.exists(project.get_global_file_by_project(TypePath.MEDIA_ROOT, Project.PROJECT_FILE_NAME_SAMPLE_RESULT_CSV)): + context['sample_file_result_csv'] = get_link_for_dropdown_item( + project.get_global_file_by_project(TypePath.MEDIA_URL, Project.PROJECT_FILE_NAME_SAMPLE_RESULT_CSV)) + if os.path.exists(project.get_global_file_by_project(TypePath.MEDIA_ROOT, Project.PROJECT_FILE_NAME_SAMPLE_RESULT_TSV)): + context['sample_file_result_tsv'] = get_link_for_dropdown_item( + project.get_global_file_by_project(TypePath.MEDIA_URL, Project.PROJECT_FILE_NAME_SAMPLE_RESULT_TSV)) + if os.path.exists(project.get_global_file_by_project(TypePath.MEDIA_ROOT, Project.PROJECT_FILE_NAME_SAMPLE_RESULT_SETTINGS_CSV)): + context['samples_file_settings_statistics_csv'] = get_link_for_dropdown_item( + project.get_global_file_by_project(TypePath.MEDIA_URL, Project.PROJECT_FILE_NAME_SAMPLE_RESULT_SETTINGS_CSV)) + if os.path.exists(project.get_global_file_by_project(TypePath.MEDIA_ROOT, Project.PROJECT_FILE_NAME_SAMPLE_RESULT_SETTINGS_TSV)): + context['samples_file_settings_statistics_tsv'] = get_link_for_dropdown_item( + project.get_global_file_by_project(TypePath.MEDIA_URL, Project.PROJECT_FILE_NAME_SAMPLE_RESULT_SETTINGS_TSV)) + + if os.path.exists(project.get_global_file_by_project(TypePath.MEDIA_ROOT, Project.PROJECT_FILE_NAME_SAMPLE_RESULT_all_consensus)): + context['sample_file_all_consensus'] = get_link_for_dropdown_item( + project.get_global_file_by_project(TypePath.MEDIA_URL, Project.PROJECT_FILE_NAME_SAMPLE_RESULT_all_consensus)) ### need to test because in the past this file was not created context['freebays_variations_50_file'] = project.get_global_file_by_project_web(Project.PROJECT_FILE_NAME_TAB_VARIATIONS_FREEBAYES) @@ -1633,21 +1665,17 @@ def get_context_data(self, **kwargs): (os.path.exists(file_pangolin_result) and software_pangolin.pangolin_results_out_date(project)) ): context['update_pangolin'] = True context['update_pangolin_message'] = mark_safe(software_pangolin.get_update_message(project)) - + + ## pangolin file if (project.number_passed_sequences > 0 and os.path.exists(file_pangolin_result)): - context['pangolin_lineage'] = project.get_global_file_by_project_web(Project.PROJECT_FILE_NAME_Pangolin_lineage) + context['pangolin_lineage'] = get_link_for_dropdown_item(project.get_global_file_by_project(TypePath.MEDIA_ROOT, Project.PROJECT_FILE_NAME_Pangolin_lineage)) #### nextclade link -# if (is_sars_cov_2 and \ -# os.path.exists(project.get_global_file_by_project(TypePath.MEDIA_ROOT, Project.PROJECT_FILE_NAME_SAMPLE_RESULT_all_consensus)) and \ -# settings.SHOW_NEXTCLADE_LINK): ## docker versions doesn't show NextClade link if (os.path.exists(project.get_global_file_by_project(TypePath.MEDIA_ROOT, Project.PROJECT_FILE_NAME_SAMPLE_RESULT_all_consensus)) and \ settings.SHOW_NEXTCLADE_LINK): ## docker versions doesn't show NextClade link - context['nextclade_link'] = "{}{}://{}{}".format( - Constants.NEXTCLADE_LINK, - settings.WEB_SITE_HTTP_NAME, - get_current_site(self.request), - project.get_global_file_by_project(TypePath.MEDIA_URL, Project.PROJECT_FILE_NAME_SAMPLE_RESULT_all_consensus)) + context = _get_constext_nextclade( + project.get_global_file_by_project(TypePath.MEDIA_URL, Project.PROJECT_FILE_NAME_SAMPLE_RESULT_all_consensus), + context, get_current_site(self.request), is_sars_cov_2) return context @@ -1959,22 +1987,48 @@ def get_context_data(self, **kwargs): context['software_used'] = software_used #### nextclade link -# software_pangolin = SoftwarePangolin() -# if (software_pangolin.is_ref_sars_cov_2(project_sample.project.reference.get_reference_fasta(TypePath.MEDIA_ROOT)) and \ -# os.path.exists(project_sample.get_consensus_file(TypePath.MEDIA_ROOT)) and \ -# settings.SHOW_NEXTCLADE_LINK): ## docker versions doesn't show NextClade link + software_pangolin = SoftwarePangolin() + is_sars_cov_2 = software_pangolin.is_ref_sars_cov_2(project_sample.project.reference.get_reference_fasta(TypePath.MEDIA_ROOT)) if (os.path.exists(project_sample.get_consensus_file(TypePath.MEDIA_ROOT)) and \ settings.SHOW_NEXTCLADE_LINK): ## docker versions doesn't show NextClade link - context['nextclade_link'] = "{}{}://{}{}".format( - Constants.NEXTCLADE_LINK, - settings.WEB_SITE_HTTP_NAME, - get_current_site(self.request), - project_sample.get_consensus_file(TypePath.MEDIA_URL)) + context = _get_constext_nextclade(project_sample.get_consensus_file(TypePath.MEDIA_URL), + context, get_current_site(self.request), is_sars_cov_2) except ProjectSample.DoesNotExist: context['error_cant_see'] = 1 return context +def _get_constext_nextclade(media_url_path, context, current_site, is_sars_cov_2): + + ## sarscov 2 + if (is_sars_cov_2): + context['nextclade_link_covid'] = "{}{}://{}{}".format( + Constants.NEXTCLADE_LINK_sars_cov_2, + settings.WEB_SITE_HTTP_NAME, + current_site, + media_url_path) + else: + context['nextclade_link_a_h3n2'] = "{}{}://{}{}".format( + Constants.NEXTCLADE_LINK_A_H3N2, + settings.WEB_SITE_HTTP_NAME, + current_site, + media_url_path) + context['nextclade_link_a_h1n1'] = "{}{}://{}{}".format( + Constants.NEXTCLADE_LINK_A_H1N1, + settings.WEB_SITE_HTTP_NAME, + current_site, + media_url_path) + context['nextclade_link_b_yamagata'] = "{}{}://{}{}".format( + Constants.NEXTCLADE_LINK_B_Yamagata, + settings.WEB_SITE_HTTP_NAME, + current_site, + media_url_path) + context['nextclade_link_b_victoria'] = "{}{}://{}{}".format( + Constants.NEXTCLADE_LINK_B_Victoria, + settings.WEB_SITE_HTTP_NAME, + current_site, + media_url_path) + return context def is_all_check_box_in_session(vect_check_to_test, request): """ diff --git a/static/tests/global_project/AllProjects_1.csv b/static/tests/global_project/AllProjects_1.csv index 81509f8e..a39ce2b4 100644 --- a/static/tests/global_project/AllProjects_1.csv +++ b/static/tests/global_project/AllProjects_1.csv @@ -1,3 +1,3 @@ Name,#samples,Reference,Last access,Created -several_names_test_create_tree_6000,4,second_stage_2_ test_create_tree,14-12-2002 20:30 +several_names_test_create_tree_6000,4,second_stage_2_ test_create_tree,2002-12-14 20:30 Total Projects,1 diff --git a/static/tests/global_project/AllProjects_1.tsv b/static/tests/global_project/AllProjects_1.tsv index 9e91c4dd..5f054bf8 100644 --- a/static/tests/global_project/AllProjects_1.tsv +++ b/static/tests/global_project/AllProjects_1.tsv @@ -1,3 +1,3 @@ "Name" "#samples" "Reference" "Last access" "Created" -"several_names_test_create_tree_6000" "4" "second_stage_2_ test_create_tree" "14-12-2002 20:30" +"several_names_test_create_tree_6000" "4" "second_stage_2_ test_create_tree" "2002-12-14 20:30" "Total Projects" "1" diff --git a/static/tests/global_project/AllSamples_1.csv b/static/tests/global_project/AllSamples_1.csv index aad0add7..c3011906 100644 --- a/static/tests/global_project/AllSamples_1.csv +++ b/static/tests/global_project/AllSamples_1.csv @@ -1,7 +1,7 @@ -,,,,,,,,,,,,,Trimmo. stats.,Trimmo. stats.,Trimmo. stats.,Trimmo. stats.,Trimmo. stats.,,,,, -sample,fastq1,fastq2,data set,vaccine status,week,onset date,collection date,lab reception date,latitude,longitude,type-subtype,xpto_1,Technology,Sample Down sized,Input Read Pairs,Both Surviving,Forward Only Surviving,Reverse Only Surviving,Dropped,FastQC,Trimmomatic,Uploaded Date,#Projects,Project Names +,,,,,,,,,,,,,,,Trimmo. stats.,Trimmo. stats.,Trimmo. stats.,Trimmo. stats.,Trimmo. stats.,,,,, +sample,fastq1,fastq2,data set,vaccine status,week,onset date,collection date,lab reception date,latitude,longitude,classification,xpto_1,Technology,Sample Down sized,Input Read Pairs,Both Surviving,Forward Only Surviving,Reverse Only Surviving,Dropped,FastQC,Trimmomatic,Uploaded Date,#Projects,Project Names EVA011_S54,EVA011_S54_L001_R1_001.fastq.gz,EVA011_S54_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",xpto_1 xpto_1,Illumina,False,,,,,,FastQC-0.11.9; (let's go again),Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),Date,1,several_names_test_create_tree_6000 -EVA003_S91,EVA003_S91_L001_R1_001.fastq.gz,EVA003_S91_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",xpto_1 xpto_1,Illumina,False,xpto,xpto1,xpto2,,xpto4,FastQC-0.11.9; (let's go again),Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),Date,1,several_names_test_create_tree_6000 -EVA002_S52,EVA002_S52_L001_R1_001.fastq.gz,EVA002_S52_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",xpto_1 xpto_1,Illumina,False,xpto,xpto1,xpto2,,xpto4,FastQC-0.11.9; (let's go again),Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),Date,1,several_names_test_create_tree_6000 -EVA001_S66,EVA001_S66_L001_R1_001.fastq.gz,EVA001_S66_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",xpto_1 xpto_1,Illumina,False,xpto,xpto1,xpto2,xpto3,xpto4,FastQC-0.11.9; (let's go again),Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),Date,1,several_names_test_create_tree_6000 +EVA003_S91,EVA003_S91_L001_R1_001.fastq.gz,EVA003_S91_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",xpto_1 xpto_1,Illumina,False,10,5,2,,44,FastQC-0.11.9; (let's go again),Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),Date,1,several_names_test_create_tree_6000 +EVA002_S52,EVA002_S52_L001_R1_001.fastq.gz,EVA002_S52_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",xpto_1 xpto_1,Illumina,False,10,5,2,,44,FastQC-0.11.9; (let's go again),Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),Date,1,several_names_test_create_tree_6000 +EVA001_S66,EVA001_S66_L001_R1_001.fastq.gz,EVA001_S66_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",xpto_1 xpto_1,Illumina,False,10,5,2,33,44,FastQC-0.11.9; (let's go again),Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),Date,1,several_names_test_create_tree_6000 Total Samples,4 diff --git a/static/tests/global_project/AllSamples_1.tsv b/static/tests/global_project/AllSamples_1.tsv index c998dc9b..ef19f7b9 100644 --- a/static/tests/global_project/AllSamples_1.tsv +++ b/static/tests/global_project/AllSamples_1.tsv @@ -1,7 +1,7 @@ -"" "" "" "" "" "" "" "" "" "" "" "" "" "Trimmo. stats." "Trimmo. stats." "Trimmo. stats." "Trimmo. stats." "Trimmo. stats." "" "" "" "" "" -"sample" "fastq1" "fastq2" "data set" "vaccine status" "week" "onset date" "collection date" "lab reception date" "latitude" "longitude" "type-subtype" "xpto_1" "Technology" "Sample Down sized" "Input Read Pairs" "Both Surviving" "Forward Only Surviving" "Reverse Only Surviving" "Dropped" "FastQC" "Trimmomatic" "Uploaded Date" "#Projects" "Project Names" +"" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "Trimmo. stats." "Trimmo. stats." "Trimmo. stats." "Trimmo. stats." "Trimmo. stats." "" "" "" "" "" +"sample" "fastq1" "fastq2" "data set" "vaccine status" "week" "onset date" "collection date" "lab reception date" "latitude" "longitude" "classification" "xpto_1" "Technology" "Sample Down sized" "Input Read Pairs" "Both Surviving" "Forward Only Surviving" "Reverse Only Surviving" "Dropped" "FastQC" "Trimmomatic" "Uploaded Date" "#Projects" "Project Names" "EVA011_S54" "EVA011_S54_L001_R1_001.fastq.gz" "EVA011_S54_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "xpto_1 xpto_1" "Illumina" "False" "" "" "" "" "" "FastQC-0.11.9; (let's go again)" "Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic)" "Date" "1" "several_names_test_create_tree_6000" -"EVA003_S91" "EVA003_S91_L001_R1_001.fastq.gz" "EVA003_S91_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "xpto_1 xpto_1" "Illumina" "False" "xpto" "xpto1" "xpto2" "" "xpto4" "FastQC-0.11.9; (let's go again)" "Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic)" "Date" "1" "several_names_test_create_tree_6000" -"EVA002_S52" "EVA002_S52_L001_R1_001.fastq.gz" "EVA002_S52_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "xpto_1 xpto_1" "Illumina" "False" "xpto" "xpto1" "xpto2" "" "xpto4" "FastQC-0.11.9; (let's go again)" "Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic)" "Date" "1" "several_names_test_create_tree_6000" -"EVA001_S66" "EVA001_S66_L001_R1_001.fastq.gz" "EVA001_S66_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "xpto_1 xpto_1" "Illumina" "False" "xpto" "xpto1" "xpto2" "xpto3" "xpto4" "FastQC-0.11.9; (let's go again)" "Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic)" "Date" "1" "several_names_test_create_tree_6000" +"EVA003_S91" "EVA003_S91_L001_R1_001.fastq.gz" "EVA003_S91_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "xpto_1 xpto_1" "Illumina" "False" "10" "5" "2" "" "44" "FastQC-0.11.9; (let's go again)" "Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic)" "Date" "1" "several_names_test_create_tree_6000" +"EVA002_S52" "EVA002_S52_L001_R1_001.fastq.gz" "EVA002_S52_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "xpto_1 xpto_1" "Illumina" "False" "10" "5" "2" "" "44" "FastQC-0.11.9; (let's go again)" "Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic)" "Date" "1" "several_names_test_create_tree_6000" +"EVA001_S66" "EVA001_S66_L001_R1_001.fastq.gz" "EVA001_S66_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "xpto_1 xpto_1" "Illumina" "False" "10" "5" "2" "33" "44" "FastQC-0.11.9; (let's go again)" "Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic)" "Date" "1" "several_names_test_create_tree_6000" "Total Samples" "4" diff --git a/static/tests/global_project/insa_flu_sample_output.csv b/static/tests/global_project/insa_flu_sample_output.csv index 9cef8db3..72318837 100644 --- a/static/tests/global_project/insa_flu_sample_output.csv +++ b/static/tests/global_project/insa_flu_sample_output.csv @@ -1,6 +1,6 @@ -Reference name,second_stage_2_ test_create_tree,,,,,,,,,,,,,,,,,,,,, -id,fastq1,fastq2,data set,vaccine status,week,onset date,collection date,lab reception date,latitude,longitude,type-subtype,putative mixed-infection,xpto,Technology,Sample Down sized,Available Reads/Mapped Reads/Mapped Percentage,FastQC,Trimmomatic,Mask consensus by sites,SPAdes,Snippy,Threshold to mask consensus sequences -EVA011_S54,EVA011_S54_L001_R1_001.fastq.gz,EVA011_S54_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",,xpto xpto,Illumina,False,87818/87818/100.0,FastQC-0.11.9; (let's go again),Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),"Element:element_name -> (Mask sites:2,5 Mask regions:1-30,32-50,320-500 Mask from beginning:2 Mask from end:2)",,,Not applied -EVA003_S91,EVA003_S91_L001_R1_001.fastq.gz,EVA003_S91_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",,xpto xpto,Illumina,False,87818/87818/100.0,FastQC-0.11.9; (let's go again),Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),"Element:element_name -> (Mask sites:2,5 Mask regions:1-30,32-50,320-500 Mask from beginning:2 Mask from end:2)",SPAdes-3.11.1; (let's go),Snippy-3.2-dev; (let's go_2222),Not applied -EVA002_S52,EVA002_S52_L001_R1_001.fastq.gz,EVA002_S52_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",,xpto xpto,Illumina,False,87818/87818/100.0,FastQC-0.11.9; (let's go again),Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),"Element:element_name -> (Mask sites:2,5 Mask regions:1-30,32-50,320-500 Mask from beginning:2 Mask from end:2)",SPAdes-3.11.1; (let's go),Snippy-3.2-dev; (let's go_2222),Not applied -EVA001_S66,EVA001_S66_L001_R1_001.fastq.gz,EVA001_S66_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",,xpto xpto,Illumina,False,87818/87818/100.0,FastQC-0.11.9; (let's go again),Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),"Element:element_name -> (Mask sites:2,5 Mask regions:1-30,32-50,320-500 Mask from beginning:2 Mask from end:2)",SPAdes-3.11.1; (let's go),Snippy-3.2-dev; (let's go_2222),Not applied +Reference name,second_stage_2_ test_create_tree,,,,,,,,,,,, +id,fastq1,fastq2,data set,vaccine status,week,onset date,collection date,lab reception date,latitude,longitude,classification,putative mixed-infection,xpto +EVA011_S54,EVA011_S54_L001_R1_001.fastq.gz,EVA011_S54_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",,xpto xpto +EVA003_S91,EVA003_S91_L001_R1_001.fastq.gz,EVA003_S91_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",,xpto xpto +EVA002_S52,EVA002_S52_L001_R1_001.fastq.gz,EVA002_S52_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",,xpto xpto +EVA001_S66,EVA001_S66_L001_R1_001.fastq.gz,EVA001_S66_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",,xpto xpto diff --git a/static/tests/global_project/insa_flu_sample_output.json b/static/tests/global_project/insa_flu_sample_output.json index 35b3f4bc..9104fa9b 100644 --- a/static/tests/global_project/insa_flu_sample_output.json +++ b/static/tests/global_project/insa_flu_sample_output.json @@ -1 +1 @@ -{"second_stage_2_ test_create_tree": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "type-subtype": "", "putative mixed-infection": "", "xpto_1": ""}, "EVA011_S54": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "type-subtype": "xpto, zpto", "putative mixed-infection": "", "xpto_1": "xpto_1 xpto_1"}, "EVA003_S91": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "type-subtype": "xpto, zpto", "putative mixed-infection": "", "xpto_1": "xpto_1 xpto_1"}, "EVA002_S52": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "type-subtype": "xpto, zpto", "putative mixed-infection": "", "xpto_1": "xpto_1 xpto_1"}, "EVA001_S66": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "type-subtype": "xpto, zpto", "putative mixed-infection": "", "xpto_1": "xpto_1 xpto_1"}} \ No newline at end of file +{"second_stage_2_ test_create_tree": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "classification": "", "putative mixed-infection": "", "xpto_1": ""}, "EVA011_S54": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "classification": "xpto, zpto", "putative mixed-infection": "", "xpto_1": "xpto_1 xpto_1"}, "EVA003_S91": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "classification": "xpto, zpto", "putative mixed-infection": "", "xpto_1": "xpto_1 xpto_1"}, "EVA002_S52": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "classification": "xpto, zpto", "putative mixed-infection": "", "xpto_1": "xpto_1 xpto_1"}, "EVA001_S66": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "classification": "xpto, zpto", "putative mixed-infection": "", "xpto_1": "xpto_1 xpto_1"}} \ No newline at end of file diff --git a/static/tests/global_project/insa_flu_sample_output.tsv b/static/tests/global_project/insa_flu_sample_output.tsv index 3bc6f51a..9940e5c7 100644 --- a/static/tests/global_project/insa_flu_sample_output.tsv +++ b/static/tests/global_project/insa_flu_sample_output.tsv @@ -1,6 +1,6 @@ -"Reference name" "second_stage_2_ test_create_tree" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" -"id" "fastq1" "fastq2" "data set" "vaccine status" "week" "onset date" "collection date" "lab reception date" "latitude" "longitude" "type-subtype" "putative mixed-infection" "xpto" "Technology" "Sample Down sized" "Available Reads/Mapped Reads/Mapped Percentage" "FastQC" "Trimmomatic" "Mask consensus by sites" "SPAdes" "Snippy" "Threshold to mask consensus sequences" -"EVA011_S54" "EVA011_S54_L001_R1_001.fastq.gz" "EVA011_S54_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto xpto" "Illumina" "False" "87818/87818/100.0" "FastQC-0.11.9; (let's go again)" "Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic)" "Element:element_name -> (Mask sites:2,5 Mask regions:1-30,32-50,320-500 Mask from beginning:2 Mask from end:2)" "" "" "Not applied" -"EVA003_S91" "EVA003_S91_L001_R1_001.fastq.gz" "EVA003_S91_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto xpto" "Illumina" "False" "87818/87818/100.0" "FastQC-0.11.9; (let's go again)" "Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic)" "Element:element_name -> (Mask sites:2,5 Mask regions:1-30,32-50,320-500 Mask from beginning:2 Mask from end:2)" "SPAdes-3.11.1; (let's go)" "Snippy-3.2-dev; (let's go_2222)" "Not applied" -"EVA002_S52" "EVA002_S52_L001_R1_001.fastq.gz" "EVA002_S52_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto xpto" "Illumina" "False" "87818/87818/100.0" "FastQC-0.11.9; (let's go again)" "Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic)" "Element:element_name -> (Mask sites:2,5 Mask regions:1-30,32-50,320-500 Mask from beginning:2 Mask from end:2)" "SPAdes-3.11.1; (let's go)" "Snippy-3.2-dev; (let's go_2222)" "Not applied" -"EVA001_S66" "EVA001_S66_L001_R1_001.fastq.gz" "EVA001_S66_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto xpto" "Illumina" "False" "87818/87818/100.0" "FastQC-0.11.9; (let's go again)" "Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic)" "Element:element_name -> (Mask sites:2,5 Mask regions:1-30,32-50,320-500 Mask from beginning:2 Mask from end:2)" "SPAdes-3.11.1; (let's go)" "Snippy-3.2-dev; (let's go_2222)" "Not applied" +"Reference name" "second_stage_2_ test_create_tree" "" "" "" "" "" "" "" "" "" "" "" "" +"id" "fastq1" "fastq2" "data set" "vaccine status" "week" "onset date" "collection date" "lab reception date" "latitude" "longitude" "classification" "putative mixed-infection" "xpto" +"EVA011_S54" "EVA011_S54_L001_R1_001.fastq.gz" "EVA011_S54_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto xpto" +"EVA003_S91" "EVA003_S91_L001_R1_001.fastq.gz" "EVA003_S91_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto xpto" +"EVA002_S52" "EVA002_S52_L001_R1_001.fastq.gz" "EVA002_S52_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto xpto" +"EVA001_S66" "EVA001_S66_L001_R1_001.fastq.gz" "EVA001_S66_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto xpto" diff --git a/static/tests/global_project/insa_flu_sample_output_1.json b/static/tests/global_project/insa_flu_sample_output_1.json index 92e81c2e..34c93a39 100755 --- a/static/tests/global_project/insa_flu_sample_output_1.json +++ b/static/tests/global_project/insa_flu_sample_output_1.json @@ -1 +1 @@ -{"second_stage_2_ test_create_tree": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "type-subtype": "", "putative mixed-infection": "", "xpto": ""}, "EVA011_S54": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "type-subtype": "xpto, zpto", "putative mixed-infection": "", "xpto": "xpto xpto"}, "EVA003_S91": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "type-subtype": "xpto, zpto", "putative mixed-infection": "", "xpto": "xpto xpto"}, "EVA002_S52": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "type-subtype": "xpto, zpto", "putative mixed-infection": "", "xpto": "xpto xpto"}, "EVA001_S66": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "type-subtype": "xpto, zpto", "putative mixed-infection": "", "xpto": "xpto xpto"}} \ No newline at end of file +{"second_stage_2_ test_create_tree": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "classification": "", "putative mixed-infection": "", "xpto": ""}, "EVA011_S54": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "classification": "xpto, zpto", "putative mixed-infection": "", "xpto": "xpto xpto"}, "EVA003_S91": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "classification": "xpto, zpto", "putative mixed-infection": "", "xpto": "xpto xpto"}, "EVA002_S52": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "classification": "xpto, zpto", "putative mixed-infection": "", "xpto": "xpto xpto"}, "EVA001_S66": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "classification": "xpto, zpto", "putative mixed-infection": "", "xpto": "xpto xpto"}} \ No newline at end of file diff --git a/static/tests/global_project/insa_flu_sample_output_2.csv b/static/tests/global_project/insa_flu_sample_output_2.csv index b8d0bd2e..a89dbb6f 100755 --- a/static/tests/global_project/insa_flu_sample_output_2.csv +++ b/static/tests/global_project/insa_flu_sample_output_2.csv @@ -1,6 +1,6 @@ -Reference name:,second_stage_2_ test_create_tree,,,,,,,,,,,,,,,,Trimmo. stats.,Trimmo. stats.,Trimmo. stats.,Trimmo. stats.,Trimmo. stats.,,,,, -id,fastq1,fastq2,data set,vaccine status,week,onset date,collection date,lab reception date,latitude,longitude,type-subtype,putative mixed-infection,xpto_1,Technology,Sample Down sized,Available Reads/Mapped Reads/Mapped Percentage,Input Read Pairs,Both Surviving,Forward Only Surviving,Reverse Only Surviving,Dropped,FastQC,Trimmomatic,SPAdes,Snippy,Threshold to mask consensus sequences -EVA011_S54,EVA011_S54_L001_R1_001.fastq.gz,EVA011_S54_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",,xpto_1 xpto_1,Illumina,False,87818/87818/100.0,,,,,,FastQC-0.11.9; (let's go again),Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),,,70 -EVA003_S91,EVA003_S91_L001_R1_001.fastq.gz,EVA003_S91_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",,xpto_1 xpto_1,Illumina,False,87818/87818/100.0,xpto,xpto1,xpto2,,xpto4,FastQC-0.11.9; (let's go again),Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),SPAdes-3.11.1; (let's go),Snippy-3.2-dev; (let's go_2222),70 -EVA002_S52,EVA002_S52_L001_R1_001.fastq.gz,EVA002_S52_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",,xpto_1 xpto_1,Illumina,False,87818/87818/100.0,xpto,xpto1,xpto2,,xpto4,FastQC-0.11.9; (let's go again),Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),SPAdes-3.11.1; (let's go),Snippy-3.2-dev; (let's go_2222),70 -EVA001_S66,EVA001_S66_L001_R1_001.fastq.gz,EVA001_S66_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",,xpto_1 xpto_1,Illumina,False,87818/87818/100.0,xpto,xpto1,xpto2,xpto3,xpto4,FastQC-0.11.9; (let's go again),Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),SPAdes-3.11.1; (let's go),Snippy-3.2-dev; (let's go_2222),Not applied +Reference name,second_stage_2_ test_create_tree,,,,,,,,,,,, +id,fastq1,fastq2,data set,vaccine status,week,onset date,collection date,lab reception date,latitude,longitude,classification,putative mixed-infection,xpto_1 +EVA011_S54,EVA011_S54_L001_R1_001.fastq.gz,EVA011_S54_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",,xpto_1 xpto_1 +EVA003_S91,EVA003_S91_L001_R1_001.fastq.gz,EVA003_S91_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",,xpto_1 xpto_1 +EVA002_S52,EVA002_S52_L001_R1_001.fastq.gz,EVA002_S52_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",,xpto_1 xpto_1 +EVA001_S66,EVA001_S66_L001_R1_001.fastq.gz,EVA001_S66_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",,xpto_1 xpto_1 diff --git a/static/tests/global_project/insa_flu_sample_output_2.tsv b/static/tests/global_project/insa_flu_sample_output_2.tsv index 56a146e4..88830b6e 100755 --- a/static/tests/global_project/insa_flu_sample_output_2.tsv +++ b/static/tests/global_project/insa_flu_sample_output_2.tsv @@ -1,6 +1,6 @@ -"Reference name:" "second_stage_2_ test_create_tree" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "Trimmo. stats." "Trimmo. stats." "Trimmo. stats." "Trimmo. stats." "Trimmo. stats." "" "" "" "" "" -"id" "fastq1" "fastq2" "data set" "vaccine status" "week" "onset date" "collection date" "lab reception date" "latitude" "longitude" "type-subtype" "putative mixed-infection" "xpto_1" "Technology" "Sample Down sized" "Available Reads/Mapped Reads/Mapped Percentage" "Input Read Pairs" "Both Surviving" "Forward Only Surviving" "Reverse Only Surviving" "Dropped" "FastQC" "Trimmomatic" "SPAdes" "Snippy" "Threshold to mask consensus sequences" -"EVA011_S54" "EVA011_S54_L001_R1_001.fastq.gz" "EVA011_S54_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto_1 xpto_1" "Illumina" "False" "87818/87818/100.0" "" "" "" "" "" "FastQC-0.11.9; (let's go again)" "Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic)" "" "" "70" -"EVA003_S91" "EVA003_S91_L001_R1_001.fastq.gz" "EVA003_S91_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto_1 xpto_1" "Illumina" "False" "87818/87818/100.0" "xpto" "xpto1" "xpto2" "" "xpto4" "FastQC-0.11.9; (let's go again)" "Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic)" "SPAdes-3.11.1; (let's go)" "Snippy-3.2-dev; (let's go_2222)" "70" -"EVA002_S52" "EVA002_S52_L001_R1_001.fastq.gz" "EVA002_S52_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto_1 xpto_1" "Illumina" "False" "87818/87818/100.0" "xpto" "xpto1" "xpto2" "" "xpto4" "FastQC-0.11.9; (let's go again)" "Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic)" "SPAdes-3.11.1; (let's go)" "Snippy-3.2-dev; (let's go_2222)" "70" -"EVA001_S66" "EVA001_S66_L001_R1_001.fastq.gz" "EVA001_S66_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto_1 xpto_1" "Illumina" "False" "87818/87818/100.0" "xpto" "xpto1" "xpto2" "xpto3" "xpto4" "FastQC-0.11.9; (let's go again)" "Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic)" "SPAdes-3.11.1; (let's go)" "Snippy-3.2-dev; (let's go_2222)" "Not applied" +"Reference name" "second_stage_2_ test_create_tree" "" "" "" "" "" "" "" "" "" "" "" "" +"id" "fastq1" "fastq2" "data set" "vaccine status" "week" "onset date" "collection date" "lab reception date" "latitude" "longitude" "classification" "putative mixed-infection" "xpto_1" +"EVA011_S54" "EVA011_S54_L001_R1_001.fastq.gz" "EVA011_S54_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto_1 xpto_1" +"EVA003_S91" "EVA003_S91_L001_R1_001.fastq.gz" "EVA003_S91_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto_1 xpto_1" +"EVA002_S52" "EVA002_S52_L001_R1_001.fastq.gz" "EVA002_S52_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto_1 xpto_1" +"EVA001_S66" "EVA001_S66_L001_R1_001.fastq.gz" "EVA001_S66_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto_1 xpto_1" diff --git a/static/tests/global_project/insa_flu_sample_output_2_ont.csv b/static/tests/global_project/insa_flu_sample_output_2_ont.csv index 6da11c7c..e3a7e3b2 100755 --- a/static/tests/global_project/insa_flu_sample_output_2_ont.csv +++ b/static/tests/global_project/insa_flu_sample_output_2_ont.csv @@ -1,10 +1,10 @@ -Reference name:,second_stage_2_ test_create_tree,,,,,,,,,,,,,,,,Trimmo. stats.,Trimmo. stats.,Trimmo. stats.,Trimmo. stats.,Trimmo. stats.,NanoStat stats.,NanoStat stats.,NanoStat stats.,NanoStat stats.,NanoStat stats.,NanoStat stats.,NanoStat stats.,NanoStat stats.,,,,,,,,,,,, -id,fastq1,fastq2,data set,vaccine status,week,onset date,collection date,lab reception date,latitude,longitude,type-subtype,putative mixed-infection,xpto_1,Technology,Sample Down sized,Available Reads/Mapped Reads/Mapped Percentage,Input Read Pairs,Both Surviving,Forward Only Surviving,Reverse Only Surviving,Dropped,Mean read length - ONT,Mean read quality - ONT,Median read length - ONT,Median read quality - ONT,Number of reads - ONT,Read length N50 - ONT,STDEV read length - ONT,Total bases - ONT,NanoStat,RabbitQC,NanoFilt,FastQC,Trimmomatic,Medaka,Samtools,Minimum depth of coverage per site to validate the sequence,MSA Masker,SPAdes,Snippy,Threshold to mask consensus sequences -EVA011_S54_ONT,EVA011_S54_L001_R1_001.fastq.gz,,,,,,,,,,"xpto, zpto",,xpto_1 xpto_1,ONT,False,0/0/0,,,,,,0,1,2,3,4,5,6,7,NanoStat-1.4.0,RabbitQC-0.0.1; (-w 3 -D),NanoFilt-2.6.0; (let's go again),,,,,,,,,70 -EVA003_S91_ONT,EVA003_S91_L001_R1_001.fastq.gz,,,,,,,,,,"xpto, zpto",,xpto_1 xpto_1,ONT,False,12505/12505/100.0,,,,,,0,1,2,3,4,5,6,7,NanoStat-1.4.0,RabbitQC-0.0.1; (-w 3 -D),NanoFilt-2.6.0; (let's go again),,,Medaka-1.2.1; (consensus )/Medaka-1.2.1; (variant --verbose),Samtools-1.3; (depth -aa -q 10),Minimum depth of coverage per site to validate the sequence; (Threshold:6007),MSA Masker-1.0; (MSA parameters; for coverages less than 6007 in 40% of the regions.),,,70 -EVA002_S52_ONT,EVA002_S52_L001_R1_001.fastq.gz,,,,,,,,,,"xpto, zpto",,xpto_1 xpto_1,ONT,False,0/0/0,,,,,,0,1,2,3,4,5,6,7,NanoStat-1.4.0,RabbitQC-0.0.1; (-w 3 -D),NanoFilt-2.6.0; (let's go again),,,Medaka-1.2.1; (consensus )/Medaka-1.2.1; (variant --verbose),Samtools-1.3; (depth -aa -q 10),Minimum depth of coverage per site to validate the sequence; (Threshold:6006),MSA Masker-1.0; (MSA parameters; for coverages less than 6006 in 40% of the regions.),,,70 -EVA001_S66_ONT,EVA001_S66_L001_R1_001.fastq.gz,,,,,,,,,,"xpto, zpto",,xpto_1 xpto_1,ONT,False,0/0/0,,,,,,0,1,2,3,4,5,6,7,NanoStat-1.4.0,RabbitQC-0.0.1; (-w 3 -D),NanoFilt-2.6.0; (let's go again),,,Medaka-1.2.1; (consensus )/Medaka-1.2.1; (variant --verbose),Samtools-1.3; (depth -aa -q 10),Minimum depth of coverage per site to validate the sequence; (Threshold:6005),MSA Masker-1.0; (MSA parameters; for coverages less than 6005 in 40% of the regions.),,,70 -EVA011_S54,EVA011_S54_L001_R1_001.fastq.gz,EVA011_S54_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",,xpto_1 xpto_1,Illumina,False,87818/87818/100.0,,,,,,,,,,,,,,,,,FastQC-0.11.9; (let's go again),Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),,,,,,,70 -EVA003_S91,EVA003_S91_L001_R1_001.fastq.gz,EVA003_S91_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",,xpto_1 xpto_1,Illumina,False,87818/87818/100.0,xpto,xpto1,xpto2,,xpto4,,,,,,,,,,,,FastQC-0.11.9; (let's go again),Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),,,,,SPAdes-3.11.1; (let's go),Snippy-3.2-dev; (let's go_2222),70 -EVA002_S52,EVA002_S52_L001_R1_001.fastq.gz,EVA002_S52_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",,xpto_1 xpto_1,Not defined,False,0/0/0,xpto,xpto1,xpto2,,xpto4,,,,,,,,,,,,FastQC-0.11.9; (let's go again),Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),,,,,SPAdes-3.11.1; (let's go),Snippy-3.2-dev; (let's go_2222),70 -EVA001_S66,EVA001_S66_L001_R1_001.fastq.gz,EVA001_S66_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",,xpto_1 xpto_1,Not defined,False,0/0/0,xpto,xpto1,xpto2,xpto3,xpto4,,,,,,,,,,,,FastQC-0.11.9; (let's go again),Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),,,,,SPAdes-3.11.1; (let's go),Snippy-3.2-dev; (let's go_2222),Not applied +Reference name,second_stage_2_ test_create_tree,,,,,,,,,,,, +id,fastq1,fastq2,data set,vaccine status,week,onset date,collection date,lab reception date,latitude,longitude,classification,putative mixed-infection,xpto_1 +EVA011_S54_ONT,EVA011_S54_L001_R1_001.fastq.gz,,,,,,,,,,"xpto, zpto",,xpto_1 xpto_1 +EVA003_S91_ONT,EVA003_S91_L001_R1_001.fastq.gz,,,,,,,,,,"xpto, zpto",,xpto_1 xpto_1 +EVA002_S52_ONT,EVA002_S52_L001_R1_001.fastq.gz,,,,,,,,,,"xpto, zpto",,xpto_1 xpto_1 +EVA001_S66_ONT,EVA001_S66_L001_R1_001.fastq.gz,,,,,,,,,,"xpto, zpto",,xpto_1 xpto_1 +EVA011_S54,EVA011_S54_L001_R1_001.fastq.gz,EVA011_S54_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",,xpto_1 xpto_1 +EVA003_S91,EVA003_S91_L001_R1_001.fastq.gz,EVA003_S91_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",,xpto_1 xpto_1 +EVA002_S52,EVA002_S52_L001_R1_001.fastq.gz,EVA002_S52_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",,xpto_1 xpto_1 +EVA001_S66,EVA001_S66_L001_R1_001.fastq.gz,EVA001_S66_L001_R2_001.fastq.gz,,,,,,,,,"xpto, zpto",,xpto_1 xpto_1 diff --git a/static/tests/global_project/insa_flu_sample_output_2_ont.tsv b/static/tests/global_project/insa_flu_sample_output_2_ont.tsv index 7da6b173..806ba9f0 100755 --- a/static/tests/global_project/insa_flu_sample_output_2_ont.tsv +++ b/static/tests/global_project/insa_flu_sample_output_2_ont.tsv @@ -1,10 +1,10 @@ -"Reference name:" "second_stage_2_ test_create_tree" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "Trimmo. stats." "Trimmo. stats." "Trimmo. stats." "Trimmo. stats." "Trimmo. stats." "NanoStat stats." "NanoStat stats." "NanoStat stats." "NanoStat stats." "NanoStat stats." "NanoStat stats." "NanoStat stats." "NanoStat stats." "" "" "" "" "" "" "" "" "" "" "" "" -"id" "fastq1" "fastq2" "data set" "vaccine status" "week" "onset date" "collection date" "lab reception date" "latitude" "longitude" "type-subtype" "putative mixed-infection" "xpto_1" "Technology" "Sample Down sized" "Available Reads/Mapped Reads/Mapped Percentage" "Input Read Pairs" "Both Surviving" "Forward Only Surviving" "Reverse Only Surviving" "Dropped" "Mean read length - ONT" "Mean read quality - ONT" "Median read length - ONT" "Median read quality - ONT" "Number of reads - ONT" "Read length N50 - ONT" "STDEV read length - ONT" "Total bases - ONT" "NanoStat" "RabbitQC" "NanoFilt" "FastQC" "Trimmomatic" "Medaka" "Samtools" "Minimum depth of coverage per site to validate the sequence" "MSA Masker" "SPAdes" "Snippy" "Threshold to mask consensus sequences" -"EVA011_S54_ONT" "EVA011_S54_L001_R1_001.fastq.gz" "" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto_1 xpto_1" "ONT" "False" "0/0/0" "" "" "" "" "" "0" "1" "2" "3" "4" "5" "6" "7" "NanoStat-1.4.0" "RabbitQC-0.0.1; (-w 3 -D)" "NanoFilt-2.6.0; (let's go again)" "" "" "" "" "" "" "" "" "70" -"EVA003_S91_ONT" "EVA003_S91_L001_R1_001.fastq.gz" "" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto_1 xpto_1" "ONT" "False" "12505/12505/100.0" "" "" "" "" "" "0" "1" "2" "3" "4" "5" "6" "7" "NanoStat-1.4.0" "RabbitQC-0.0.1; (-w 3 -D)" "NanoFilt-2.6.0; (let's go again)" "" "" "Medaka-1.2.1; (consensus )/Medaka-1.2.1; (variant --verbose)" "Samtools-1.3; (depth -aa -q 10)" "Minimum depth of coverage per site to validate the sequence; (Threshold:6007)" "MSA Masker-1.0; (MSA parameters; for coverages less than 6007 in 40% of the regions.)" "" "" "70" -"EVA002_S52_ONT" "EVA002_S52_L001_R1_001.fastq.gz" "" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto_1 xpto_1" "ONT" "False" "0/0/0" "" "" "" "" "" "0" "1" "2" "3" "4" "5" "6" "7" "NanoStat-1.4.0" "RabbitQC-0.0.1; (-w 3 -D)" "NanoFilt-2.6.0; (let's go again)" "" "" "Medaka-1.2.1; (consensus )/Medaka-1.2.1; (variant --verbose)" "Samtools-1.3; (depth -aa -q 10)" "Minimum depth of coverage per site to validate the sequence; (Threshold:6006)" "MSA Masker-1.0; (MSA parameters; for coverages less than 6006 in 40% of the regions.)" "" "" "70" -"EVA001_S66_ONT" "EVA001_S66_L001_R1_001.fastq.gz" "" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto_1 xpto_1" "ONT" "False" "0/0/0" "" "" "" "" "" "0" "1" "2" "3" "4" "5" "6" "7" "NanoStat-1.4.0" "RabbitQC-0.0.1; (-w 3 -D)" "NanoFilt-2.6.0; (let's go again)" "" "" "Medaka-1.2.1; (consensus )/Medaka-1.2.1; (variant --verbose)" "Samtools-1.3; (depth -aa -q 10)" "Minimum depth of coverage per site to validate the sequence; (Threshold:6005)" "MSA Masker-1.0; (MSA parameters; for coverages less than 6005 in 40% of the regions.)" "" "" "70" -"EVA011_S54" "EVA011_S54_L001_R1_001.fastq.gz" "EVA011_S54_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto_1 xpto_1" "Illumina" "False" "87818/87818/100.0" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "FastQC-0.11.9; (let's go again)" "Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic)" "" "" "" "" "" "" "70" -"EVA003_S91" "EVA003_S91_L001_R1_001.fastq.gz" "EVA003_S91_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto_1 xpto_1" "Illumina" "False" "87818/87818/100.0" "xpto" "xpto1" "xpto2" "" "xpto4" "" "" "" "" "" "" "" "" "" "" "" "FastQC-0.11.9; (let's go again)" "Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic)" "" "" "" "" "SPAdes-3.11.1; (let's go)" "Snippy-3.2-dev; (let's go_2222)" "70" -"EVA002_S52" "EVA002_S52_L001_R1_001.fastq.gz" "EVA002_S52_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto_1 xpto_1" "Not defined" "False" "0/0/0" "xpto" "xpto1" "xpto2" "" "xpto4" "" "" "" "" "" "" "" "" "" "" "" "FastQC-0.11.9; (let's go again)" "Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic)" "" "" "" "" "SPAdes-3.11.1; (let's go)" "Snippy-3.2-dev; (let's go_2222)" "70" -"EVA001_S66" "EVA001_S66_L001_R1_001.fastq.gz" "EVA001_S66_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto_1 xpto_1" "Not defined" "False" "0/0/0" "xpto" "xpto1" "xpto2" "xpto3" "xpto4" "" "" "" "" "" "" "" "" "" "" "" "FastQC-0.11.9; (let's go again)" "Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic)" "" "" "" "" "SPAdes-3.11.1; (let's go)" "Snippy-3.2-dev; (let's go_2222)" "Not applied" +"Reference name" "second_stage_2_ test_create_tree" "" "" "" "" "" "" "" "" "" "" "" "" +"id" "fastq1" "fastq2" "data set" "vaccine status" "week" "onset date" "collection date" "lab reception date" "latitude" "longitude" "classification" "putative mixed-infection" "xpto_1" +"EVA011_S54_ONT" "EVA011_S54_L001_R1_001.fastq.gz" "" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto_1 xpto_1" +"EVA003_S91_ONT" "EVA003_S91_L001_R1_001.fastq.gz" "" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto_1 xpto_1" +"EVA002_S52_ONT" "EVA002_S52_L001_R1_001.fastq.gz" "" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto_1 xpto_1" +"EVA001_S66_ONT" "EVA001_S66_L001_R1_001.fastq.gz" "" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto_1 xpto_1" +"EVA011_S54" "EVA011_S54_L001_R1_001.fastq.gz" "EVA011_S54_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto_1 xpto_1" +"EVA003_S91" "EVA003_S91_L001_R1_001.fastq.gz" "EVA003_S91_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto_1 xpto_1" +"EVA002_S52" "EVA002_S52_L001_R1_001.fastq.gz" "EVA002_S52_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto_1 xpto_1" +"EVA001_S66" "EVA001_S66_L001_R1_001.fastq.gz" "EVA001_S66_L001_R2_001.fastq.gz" "" "" "" "" "" "" "" "" "xpto, zpto" "" "xpto_1 xpto_1" diff --git a/static/tests/global_project/insa_flu_sample_output_2_ont_settings.csv b/static/tests/global_project/insa_flu_sample_output_2_ont_settings.csv new file mode 100755 index 00000000..0aed375e --- /dev/null +++ b/static/tests/global_project/insa_flu_sample_output_2_ont_settings.csv @@ -0,0 +1,10 @@ +Reference name:,second_stage_2_ test_create_tree,,,,,,,,Trimmo. stats.,Trimmo. stats.,Trimmo. stats.,Trimmo. stats.,Trimmo. stats.,NanoStat stats.,NanoStat stats.,NanoStat stats.,NanoStat stats.,NanoStat stats.,NanoStat stats.,NanoStat stats.,NanoStat stats.,,,,,,,,,,,, +id,fastq1,fastq2,sample date created,Technology,Sample Down sized,Available Reads for Mapping,Mapped Reads,Mapped Percentage,Input Read Pairs,Both Surviving,Forward Only Surviving,Reverse Only Surviving,Dropped,Mean read length - ONT,Mean read quality - ONT,Median read length - ONT,Median read quality - ONT,Number of reads - ONT,Read length N50 - ONT,STDEV read length - ONT,Total bases - ONT,NanoStat,RabbitQC,NanoFilt,FastQC,Trimmomatic,Medaka,Samtools,Minimum depth of coverage per site to validate the sequence,MSA Masker,SPAdes,Snippy,Threshold to mask consensus sequences +EVA011_S54_ONT,EVA011_S54_L001_R1_001.fastq.gz,,2010-10-23,ONT,False,-,-,-,,,,,,0,1,2,3,4,5,6,7,NanoStat-1.4.0,RabbitQC-0.0.1; (-w 3 -D),NanoFilt-2.6.0; (let's go again),,,,,,,,,70 +EVA003_S91_ONT,EVA003_S91_L001_R1_001.fastq.gz,,2010-10-23,ONT,False,4,12505,312625.0,,,,,,0,1,2,3,4,5,6,7,NanoStat-1.4.0,RabbitQC-0.0.1; (-w 3 -D),NanoFilt-2.6.0; (let's go again),,,Medaka-1.2.1; (consensus )/Medaka-1.2.1; (variant --verbose),Samtools-1.3; (depth -aa -q 10),Minimum depth of coverage per site to validate the sequence; (Threshold:6007),MSA Masker-1.0; (MSA parameters; for coverages less than 6007 in 40% of the regions.),,,70 +EVA002_S52_ONT,EVA002_S52_L001_R1_001.fastq.gz,,2010-10-23,ONT,False,-,-,-,,,,,,0,1,2,3,4,5,6,7,NanoStat-1.4.0,RabbitQC-0.0.1; (-w 3 -D),NanoFilt-2.6.0; (let's go again),,,Medaka-1.2.1; (consensus )/Medaka-1.2.1; (variant --verbose),Samtools-1.3; (depth -aa -q 10),Minimum depth of coverage per site to validate the sequence; (Threshold:6006),MSA Masker-1.0; (MSA parameters; for coverages less than 6006 in 40% of the regions.),,,70 +EVA001_S66_ONT,EVA001_S66_L001_R1_001.fastq.gz,,2010-10-23,ONT,False,-,-,-,,,,,,0,1,2,3,4,5,6,7,NanoStat-1.4.0,RabbitQC-0.0.1; (-w 3 -D),NanoFilt-2.6.0; (let's go again),,,Medaka-1.2.1; (consensus )/Medaka-1.2.1; (variant --verbose),Samtools-1.3; (depth -aa -q 10),Minimum depth of coverage per site to validate the sequence; (Threshold:6005),MSA Masker-1.0; (MSA parameters; for coverages less than 6005 in 40% of the regions.),,,70 +EVA011_S54,EVA011_S54_L001_R1_001.fastq.gz,EVA011_S54_L001_R2_001.fastq.gz,2010-10-23,Illumina,False,-,-,-,,,,,,,,,,,,,,,,,FastQC-0.11.9; (let's go again),Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),,,,,,,70 +EVA003_S91,EVA003_S91_L001_R1_001.fastq.gz,EVA003_S91_L001_R2_001.fastq.gz,2010-10-23,Illumina,False,-,-,-,xpto,xpto1,xpto2,,xpto4,,,,,,,,,,,,FastQC-0.11.9; (let's go again),Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),,,,,SPAdes-3.11.1; (let's go),Snippy-3.2-dev; (let's go_2222),70 +EVA002_S52,EVA002_S52_L001_R1_001.fastq.gz,EVA002_S52_L001_R2_001.fastq.gz,2010-10-23,Not defined,False,-,-,-,xpto,xpto1,xpto2,,xpto4,,,,,,,,,,,,FastQC-0.11.9; (let's go again),Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),,,,,SPAdes-3.11.1; (let's go),Snippy-3.2-dev; (let's go_2222),70 +EVA001_S66,EVA001_S66_L001_R1_001.fastq.gz,EVA001_S66_L001_R2_001.fastq.gz,2010-10-23,Not defined,False,-,-,-,xpto,xpto1,xpto2,xpto3,xpto4,,,,,,,,,,,,FastQC-0.11.9; (let's go again),Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),,,,,SPAdes-3.11.1; (let's go),Snippy-3.2-dev; (let's go_2222),Not applied diff --git a/static/tests/global_project/insa_flu_sample_output_2_ont_simple.csv b/static/tests/global_project/insa_flu_sample_output_2_ont_simple.csv index 5caa4cb8..f20e9aa3 100755 --- a/static/tests/global_project/insa_flu_sample_output_2_ont_simple.csv +++ b/static/tests/global_project/insa_flu_sample_output_2_ont_simple.csv @@ -1,4 +1,4 @@ -id,data set,vaccine status,week,onset date,collection date,lab reception date,latitude,longitude,type-subtype,putative mixed-infection,xpto_1 +id,data set,vaccine status,week,onset date,collection date,lab reception date,latitude,longitude,classification,putative mixed-infection,xpto_1 second_stage_2_ test_create_tree,,,,,,,,,,, EVA011_S54_ONT,,,,,,,,,"xpto, zpto",,xpto_1 xpto_1 EVA003_S91_ONT,,,,,,,,,"xpto, zpto",,xpto_1 xpto_1 diff --git a/static/tests/global_project/insa_flu_sample_output_2_settings.csv b/static/tests/global_project/insa_flu_sample_output_2_settings.csv new file mode 100755 index 00000000..7453af20 --- /dev/null +++ b/static/tests/global_project/insa_flu_sample_output_2_settings.csv @@ -0,0 +1,6 @@ +Reference name:,second_stage_2_ test_create_tree,,,,,,,,Trimmo. stats.,Trimmo. stats.,Trimmo. stats.,Trimmo. stats.,Trimmo. stats.,,,,,, +id,fastq1,fastq2,sample date created,Technology,Sample Down sized,Available Reads for Mapping,Mapped Reads,Mapped Percentage,Input Read Pairs,Both Surviving,Forward Only Surviving,Reverse Only Surviving,Dropped,FastQC,illumina_stat,Trimmomatic,SPAdes,Snippy,Threshold to mask consensus sequences +EVA011_S54,EVA011_S54_L001_R1_001.fastq.gz,EVA011_S54_L001_R2_001.fastq.gz,2010-10-23,Illumina,False,20001,87818,439.1,,,,,,FastQC-0.11.9; (let's go again),illumina_stat,Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),,,70 +EVA003_S91,EVA003_S91_L001_R1_001.fastq.gz,EVA003_S91_L001_R2_001.fastq.gz,2010-10-23,Illumina,False,20001,87818,439.1,10,5,2,,44,FastQC-0.11.9; (let's go again),illumina_stat,Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),SPAdes-3.11.1; (let's go),Snippy-3.2-dev; (let's go_2222),70 +EVA002_S52,EVA002_S52_L001_R1_001.fastq.gz,EVA002_S52_L001_R2_001.fastq.gz,2010-10-23,Illumina,False,20001,87818,439.1,10,5,2,,44,FastQC-0.11.9; (let's go again),illumina_stat,Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),SPAdes-3.11.1; (let's go),Snippy-3.2-dev; (let's go_2222),70 +EVA001_S66,EVA001_S66_L001_R1_001.fastq.gz,EVA001_S66_L001_R2_001.fastq.gz,2010-10-23,Illumina,False,20001,87818,439.1,10,5,2,33,44,FastQC-0.11.9; (let's go again),illumina_stat,Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),SPAdes-3.11.1; (let's go),Snippy-3.2-dev; (let's go_2222),Not applied diff --git a/static/tests/global_project/insa_flu_sample_output_2_simple.csv b/static/tests/global_project/insa_flu_sample_output_2_simple.csv new file mode 100755 index 00000000..b6062b70 --- /dev/null +++ b/static/tests/global_project/insa_flu_sample_output_2_simple.csv @@ -0,0 +1,6 @@ +id,data set,vaccine status,week,onset date,collection date,lab reception date,latitude,longitude,classification,putative mixed-infection,xpto_1 +second_stage_2_ test_create_tree,,,,,,,,,,, +EVA011_S54,,,,,,,,,"xpto, zpto",,xpto_1 xpto_1 +EVA003_S91,,,,,,,,,"xpto, zpto",,xpto_1 xpto_1 +EVA002_S52,,,,,,,,,"xpto, zpto",,xpto_1 xpto_1 +EVA001_S66,,,,,,,,,"xpto, zpto",,xpto_1 xpto_1 diff --git a/static/tests/global_project/insa_flu_sample_output_ont.json b/static/tests/global_project/insa_flu_sample_output_ont.json index 4ba0dc07..e15b5501 100755 --- a/static/tests/global_project/insa_flu_sample_output_ont.json +++ b/static/tests/global_project/insa_flu_sample_output_ont.json @@ -1 +1 @@ -{"second_stage_2_ test_create_tree": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "type-subtype": "", "putative mixed-infection": "", "xpto_1": ""}, "EVA011_S54_ONT": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "type-subtype": "xpto, zpto", "putative mixed-infection": "", "xpto_1": "xpto_1 xpto_1"}, "EVA003_S91_ONT": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "type-subtype": "xpto, zpto", "putative mixed-infection": "", "xpto_1": "xpto_1 xpto_1"}, "EVA002_S52_ONT": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "type-subtype": "xpto, zpto", "putative mixed-infection": "", "xpto_1": "xpto_1 xpto_1"}, "EVA001_S66_ONT": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "type-subtype": "xpto, zpto", "putative mixed-infection": "", "xpto_1": "xpto_1 xpto_1"}, "EVA011_S54": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "type-subtype": "xpto, zpto", "putative mixed-infection": "", "xpto_1": "xpto_1 xpto_1"}, "EVA003_S91": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "type-subtype": "xpto, zpto", "putative mixed-infection": "", "xpto_1": "xpto_1 xpto_1"}, "EVA002_S52": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "type-subtype": "xpto, zpto", "putative mixed-infection": "", "xpto_1": "xpto_1 xpto_1"}, "EVA001_S66": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "type-subtype": "xpto, zpto", "putative mixed-infection": "", "xpto_1": "xpto_1 xpto_1"}} \ No newline at end of file +{"second_stage_2_ test_create_tree": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "classification": "", "putative mixed-infection": "", "xpto_1": ""}, "EVA011_S54_ONT": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "classification": "xpto, zpto", "putative mixed-infection": "", "xpto_1": "xpto_1 xpto_1"}, "EVA003_S91_ONT": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "classification": "xpto, zpto", "putative mixed-infection": "", "xpto_1": "xpto_1 xpto_1"}, "EVA002_S52_ONT": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "classification": "xpto, zpto", "putative mixed-infection": "", "xpto_1": "xpto_1 xpto_1"}, "EVA001_S66_ONT": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "classification": "xpto, zpto", "putative mixed-infection": "", "xpto_1": "xpto_1 xpto_1"}, "EVA011_S54": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "classification": "xpto, zpto", "putative mixed-infection": "", "xpto_1": "xpto_1 xpto_1"}, "EVA003_S91": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "classification": "xpto, zpto", "putative mixed-infection": "", "xpto_1": "xpto_1 xpto_1"}, "EVA002_S52": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "classification": "xpto, zpto", "putative mixed-infection": "", "xpto_1": "xpto_1 xpto_1"}, "EVA001_S66": {"data set": "", "vaccine status": "", "week": "", "onset date": "", "collection date": "", "lab reception date": "", "latitude": "", "longitude": "", "classification": "xpto, zpto", "putative mixed-infection": "", "xpto_1": "xpto_1 xpto_1"}} \ No newline at end of file diff --git a/static/tests/global_project/insa_flu_sample_output_settings.csv b/static/tests/global_project/insa_flu_sample_output_settings.csv new file mode 100755 index 00000000..b4a6235d --- /dev/null +++ b/static/tests/global_project/insa_flu_sample_output_settings.csv @@ -0,0 +1,6 @@ +Reference name,second_stage_2_ test_create_tree,,,,,,,,,,,,, +id,fastq1,fastq2,sample date created,Technology,Sample Down sized,Available Reads for Mapping,Mapped Reads,Mapped Percentage,FastQC,Trimmomatic,Mask consensus by sites,SPAdes,Snippy,Threshold to mask consensus sequences +EVA011_S54,EVA011_S54_L001_R1_001.fastq.gz,EVA011_S54_L001_R2_001.fastq.gz,2010-10-23,Illumina,False,-,-,-,FastQC-0.11.9; (let's go again),Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),"Element:element_name -> (Mask sites:2,5 Mask regions:1-30,32-50,320-500 Mask from beginning:2 Mask from end:2)",,,Not applied +EVA003_S91,EVA003_S91_L001_R1_001.fastq.gz,EVA003_S91_L001_R2_001.fastq.gz,2010-10-23,Illumina,False,-,-,-,FastQC-0.11.9; (let's go again),Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),"Element:element_name -> (Mask sites:2,5 Mask regions:1-30,32-50,320-500 Mask from beginning:2 Mask from end:2)",SPAdes-3.11.1; (let's go),Snippy-3.2-dev; (let's go_2222),Not applied +EVA002_S52,EVA002_S52_L001_R1_001.fastq.gz,EVA002_S52_L001_R2_001.fastq.gz,2010-10-23,Illumina,False,-,-,-,FastQC-0.11.9; (let's go again),Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),"Element:element_name -> (Mask sites:2,5 Mask regions:1-30,32-50,320-500 Mask from beginning:2 Mask from end:2)",SPAdes-3.11.1; (let's go),Snippy-3.2-dev; (let's go_2222),Not applied +EVA001_S66,EVA001_S66_L001_R1_001.fastq.gz,EVA001_S66_L001_R2_001.fastq.gz,2010-10-23,Illumina,False,-,-,-,FastQC-0.11.9; (let's go again),Trimmomatic-0.39; (let's go again)/Trimmomatic-0.39; (let's go againsecond version trimmomatic),"Element:element_name -> (Mask sites:2,5 Mask regions:1-30,32-50,320-500 Mask from beginning:2 Mask from end:2)",SPAdes-3.11.1; (let's go),Snippy-3.2-dev; (let's go_2222),Not applied diff --git a/static/tests/global_project/insa_flu_sample_output_simple.csv b/static/tests/global_project/insa_flu_sample_output_simple.csv index 6e3af43f..f71a6c72 100755 --- a/static/tests/global_project/insa_flu_sample_output_simple.csv +++ b/static/tests/global_project/insa_flu_sample_output_simple.csv @@ -1,4 +1,4 @@ -id,data set,vaccine status,week,onset date,collection date,lab reception date,latitude,longitude,type-subtype,putative mixed-infection,xpto +id,data set,vaccine status,week,onset date,collection date,lab reception date,latitude,longitude,classification,putative mixed-infection,xpto second_stage_2_ test_create_tree,,,,,,,,,,, EVA011_S54,,,,,,,,,"xpto, zpto",,xpto xpto EVA003_S91,,,,,,,,,"xpto, zpto",,xpto xpto diff --git a/templates/project_sample/project_sample_show.html b/templates/project_sample/project_sample_show.html index ef8f98a6..f81848ac 100644 --- a/templates/project_sample/project_sample_show.html +++ b/templates/project_sample/project_sample_show.html @@ -292,24 +292,58 @@
- Result List: {{ sample_file_result_csv }} - {{ sample_file_result_tsv }} - - {% if pangolin_lineage %} - Pangolin Lineage: {{ pangolin_lineage }} - {% endif %} +
+ + +
- All consensus: {{ sample_file_all_consensus }} - {% if nextclade_link %} - - - - - - - - + {% if nextclade_link_covid or nextclade_link_a_h3n2 %} +
+ + +
{% endif %}