Previous changeset 3:2c47c138176e (2020-06-05) Next changeset 5:51afc8a64951 (2021-05-19) |
Commit message:
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 693df287d23b0fd9dfd134b41d401a438c3f5ad6" |
added:
completemask.py sanitize_bed.py test-data/covid19/ARTIC-V1-bad.bed |
b |
diff -r 2c47c138176e -r 7fe36019c073 completemask.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/completemask.py Mon Jun 22 07:30:17 2020 -0400 |
[ |
@@ -0,0 +1,28 @@ +#!/usr/bin/env python + +import sys + + +if __name__ == '__main__': + with open(sys.argv[1]) as i: + getmasked_output = i.readline().strip() + + if not getmasked_output: + print() + print('No affected primer binding sites found!') + else: + masked_primers = getmasked_output.split('\t') + with open(sys.argv[2]) as i: + amplicon_data = [line.strip().split('\t') for line in i] + + masked_complete = [] + for primer in masked_primers: + for amplicon in amplicon_data: + if primer in amplicon: + masked_complete += amplicon + result = '\t'.join(sorted(set(masked_complete))) + print() + print('Removing reads primed with any of:') + print(result) + with open(sys.argv[1], 'w') as o: + o.write(result + '\n') |
b |
diff -r 2c47c138176e -r 7fe36019c073 sanitize_bed.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sanitize_bed.py Mon Jun 22 07:30:17 2020 -0400 |
[ |
@@ -0,0 +1,20 @@ +#!/usr/bin/env python + +import sys + + +with open(sys.argv[1]) as i: + bed_data = i.readlines() + +sanitized_data = [] +try: + for record in bed_data: + fields = record.split('\t') + sanitized_data.append( + '\t'.join(fields[:4] + ['60'] + fields[5:]) + ) +except IndexError: + pass # leave column number issue to getmasked +else: + with open(sys.argv[1], 'w') as o: + o.writelines(sanitized_data) |
b |
diff -r 2c47c138176e -r 7fe36019c073 test-data/covid19/ARTIC-V1-bad.bed --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/covid19/ARTIC-V1-bad.bed Mon Jun 22 07:30:17 2020 -0400 |
b |
b'@@ -0,0 +1,196 @@\n+MN908947.3\t30\t54\tnCoV-2019_1_LEFT\tNOINT\t+\n+MN908947.3\t385\t410\tnCoV-2019_1_RIGHT\tNOINT\t-\n+MN908947.3\t320\t342\tnCoV-2019_2_LEFT\tNOINT\t+\n+MN908947.3\t704\t726\tnCoV-2019_2_RIGHT\tNOINT\t-\n+MN908947.3\t642\t664\tnCoV-2019_3_LEFT\tNOINT\t+\n+MN908947.3\t1004\t1028\tnCoV-2019_3_RIGHT\tNOINT\t-\n+MN908947.3\t943\t965\tnCoV-2019_4_LEFT\tNOINT\t+\n+MN908947.3\t1312\t1337\tnCoV-2019_4_RIGHT\tNOINT\t-\n+MN908947.3\t1242\t1264\tnCoV-2019_5_LEFT\tNOINT\t+\n+MN908947.3\t1623\t1651\tnCoV-2019_5_RIGHT\tNOINT\t-\n+MN908947.3\t1573\t1595\tnCoV-2019_6_LEFT\tNOINT\t+\n+MN908947.3\t1942\t1964\tnCoV-2019_6_RIGHT\tNOINT\t-\n+MN908947.3\t1875\t1897\tnCoV-2019_7_LEFT\tNOINT\t+\n+MN908947.3\t2247\t2269\tnCoV-2019_7_RIGHT\tNOINT\t-\n+MN908947.3\t2181\t2205\tnCoV-2019_8_LEFT\tNOINT\t+\n+MN908947.3\t2568\t2592\tnCoV-2019_8_RIGHT\tNOINT\t-\n+MN908947.3\t2505\t2529\tnCoV-2019_9_LEFT\tNOINT\t+\n+MN908947.3\t2882\t2904\tnCoV-2019_9_RIGHT\tNOINT\t-\n+MN908947.3\t2826\t2850\tnCoV-2019_10_LEFT\tNOINT\t+\n+MN908947.3\t3183\t3210\tnCoV-2019_10_RIGHT\tNOINT\t-\n+MN908947.3\t3144\t3166\tnCoV-2019_11_LEFT\tNOINT\t+\n+MN908947.3\t3507\t3531\tnCoV-2019_11_RIGHT\tNOINT\t-\n+MN908947.3\t3460\t3482\tnCoV-2019_12_LEFT\tNOINT\t+\n+MN908947.3\t3826\t3853\tnCoV-2019_12_RIGHT\tNOINT\t-\n+MN908947.3\t3771\t3795\tnCoV-2019_13_LEFT\tNOINT\t+\n+MN908947.3\t4142\t4164\tnCoV-2019_13_RIGHT\tNOINT\t-\n+MN908947.3\t4054\t4077\tnCoV-2019_14_LEFT\tNOINT\t+\n+MN908947.3\t4428\t4450\tnCoV-2019_14_RIGHT\tNOINT\t-\n+MN908947.3\t4294\t4321\tnCoV-2019_15_LEFT\tNOINT\t+\n+MN908947.3\t4674\t4696\tnCoV-2019_15_RIGHT\tNOINT\t-\n+MN908947.3\t4636\t4658\tnCoV-2019_16_LEFT\tNOINT\t+\n+MN908947.3\t4995\t5017\tnCoV-2019_16_RIGHT\tNOINT\t-\n+MN908947.3\t4939\t4966\tnCoV-2019_17_LEFT\tNOINT\t+\n+MN908947.3\t5296\t5321\tnCoV-2019_17_RIGHT\tNOINT\t-\n+MN908947.3\t5230\t5259\tnCoV-2019_18_LEFT\tNOINT\t+\n+MN908947.3\t5620\t5644\tnCoV-2019_18_RIGHT\tNOINT\t-\n+MN908947.3\t5563\t5586\tnCoV-2019_19_LEFT\tNOINT\t+\n+MN908947.3\t5932\t5957\tnCoV-2019_19_RIGHT\tNOINT\t-\n+MN908947.3\t5867\t5894\tnCoV-2019_20_LEFT\tNOINT\t+\n+MN908947.3\t6247\t6272\tnCoV-2019_20_RIGHT\tNOINT\t-\n+MN908947.3\t6167\t6196\tnCoV-2019_21_LEFT\tNOINT\t+\n+MN908947.3\t6528\t6550\tnCoV-2019_21_RIGHT\tNOINT\t-\n+MN908947.3\t6466\t6495\tnCoV-2019_22_LEFT\tNOINT\t+\n+MN908947.3\t6846\t6873\tnCoV-2019_22_RIGHT\tNOINT\t-\n+MN908947.3\t6718\t6745\tnCoV-2019_23_LEFT\tNOINT\t+\n+MN908947.3\t7092\t7117\tnCoV-2019_23_RIGHT\tNOINT\t-\n+MN908947.3\t7035\t7058\tnCoV-2019_24_LEFT\tNOINT\t+\n+MN908947.3\t7389\t7415\tnCoV-2019_24_RIGHT\tNOINT\t-\n+MN908947.3\t7305\t7332\tnCoV-2019_25_LEFT\tNOINT\t+\n+MN908947.3\t7671\t7694\tnCoV-2019_25_RIGHT\tNOINT\t-\n+MN908947.3\t7626\t7651\tnCoV-2019_26_LEFT\tNOINT\t+\n+MN908947.3\t7997\t8019\tnCoV-2019_26_RIGHT\tNOINT\t-\n+MN908947.3\t7943\t7968\tnCoV-2019_27_LEFT\tNOINT\t+\n+MN908947.3\t8319\t8341\tnCoV-2019_27_RIGHT\tNOINT\t-\n+MN908947.3\t8249\t8275\tnCoV-2019_28_LEFT\tNOINT\t+\n+MN908947.3\t8635\t8661\tnCoV-2019_28_RIGHT\tNOINT\t-\n+MN908947.3\t8595\t8619\tnCoV-2019_29_LEFT\tNOINT\t+\n+MN908947.3\t8954\t8983\tnCoV-2019_29_RIGHT\tNOINT\t-\n+MN908947.3\t8888\t8913\tnCoV-2019_30_LEFT\tNOINT\t+\n+MN908947.3\t9245\t9271\tnCoV-2019_30_RIGHT\tNOINT\t-\n+MN908947.3\t9204\t9226\tnCoV-2019_31_LEFT\tNOINT\t+\n+MN908947.3\t9557\t9585\tnCoV-2019_31_RIGHT\tNOINT\t-\n+MN908947.3\t9477\t9502\tnCoV-2019_32_LEFT\tNOINT\t+\n+MN908947.3\t9834\t9858\tnCoV-2019_32_RIGHT\tNOINT\t-\n+MN908947.3\t9784\t9806\tnCoV-2019_33_LEFT\tNOINT\t+\n+MN908947.3\t10146\t10171\tnCoV-2019_33_RIGHT\tNOINT\t-\n+MN908947.3\t10076\t10099\tnCoV-2019_34_LEFT\tNOINT\t+\n+MN908947.3\t10437\t10459\tnCoV-2019_34_RIGHT\tNOINT\t-\n+MN908947.3\t10362\t10384\tnCoV-2019_35_LEFT\tNOINT\t+\n+MN908947.3\t10737\t10763\tnCoV-2019_35_RIGHT\tNOINT\t-\n+MN908947.3\t10666\t10688\tnCoV-2019_36_LEFT\tNOINT\t+\n+MN908947.3\t11048\t11074\tnCoV-2019_36_RIGHT\tNOINT\t-\n+MN908947.3\t10999\t11022\tnCoV-2019_37_LEFT\tNOINT\t+\n+MN908947.3\t11372\t11394\tnCoV-2019_37_RIGHT\tNOINT\t-\n+MN908947.3\t11306\t11331\tnCoV-2019_38_LEFT\tNOINT\t+\n+MN908947.3\t11668\t11693\tnCoV-2019_38_RIGHT\tNOINT\t-\n+MN908947.3\t11555\t11584\tnCoV-2019_39_LEFT\tNOINT\t+\n+MN908947.3\t11927\t11949\tnCoV-2019_39_RIGHT\tNOINT\t-\n+MN908947.3\t11863\t11889\tnCoV-2019_40_LEFT\tNOINT\t+\n+MN908947.3\t12234\t12256\tnCoV-2019_40_RIGHT\tNOINT\t-\n+MN908947.3\t12110\t12133\tnCoV-2019_41_LEFT\tNOINT\t+\n+MN908947.3\t12465\t12490\tnCoV-2019_41_RIGHT\tNOINT\t-\n+M'..b'\tNOINT\t+\n+MN908947.3\t18036\t18062\tnCoV-2019_59_RIGHT\tNOINT\t-\n+MN908947.3\t17966\t17993\tnCoV-2019_60_LEFT\tNOINT\t+\n+MN908947.3\t18324\t18348\tnCoV-2019_60_RIGHT\tNOINT\t-\n+MN908947.3\t18253\t18275\tnCoV-2019_61_LEFT\tNOINT\t+\n+MN908947.3\t18650\t18672\tnCoV-2019_61_RIGHT\tNOINT\t-\n+MN908947.3\t18596\t18618\tnCoV-2019_62_LEFT\tNOINT\t+\n+MN908947.3\t18957\t18979\tnCoV-2019_62_RIGHT\tNOINT\t-\n+MN908947.3\t18896\t18918\tnCoV-2019_63_LEFT\tNOINT\t+\n+MN908947.3\t19275\t19297\tnCoV-2019_63_RIGHT\tNOINT\t-\n+MN908947.3\t19204\t19232\tnCoV-2019_64_LEFT\tNOINT\t+\n+MN908947.3\t19591\t19616\tnCoV-2019_64_RIGHT\tNOINT\t-\n+MN908947.3\t19548\t19570\tnCoV-2019_65_LEFT\tNOINT\t+\n+MN908947.3\t19911\t19939\tnCoV-2019_65_RIGHT\tNOINT\t-\n+MN908947.3\t19844\t19866\tnCoV-2019_66_LEFT\tNOINT\t+\n+MN908947.3\t20231\t20255\tnCoV-2019_66_RIGHT\tNOINT\t-\n+MN908947.3\t20172\t20200\tnCoV-2019_67_LEFT\tNOINT\t+\n+MN908947.3\t20542\t20572\tnCoV-2019_67_RIGHT\tNOINT\t-\n+MN908947.3\t20472\t20496\tnCoV-2019_68_LEFT\tNOINT\t+\n+MN908947.3\t20867\t20890\tnCoV-2019_68_RIGHT\tNOINT\t-\n+MN908947.3\t20786\t20813\tnCoV-2019_69_LEFT\tNOINT\t+\n+MN908947.3\t21146\t21169\tnCoV-2019_69_RIGHT\tNOINT\t-\n+MN908947.3\t21075\t21104\tnCoV-2019_70_LEFT\tNOINT\t+\n+MN908947.3\t21427\t21455\tnCoV-2019_70_RIGHT\tNOINT\t-\n+MN908947.3\t21357\t21386\tnCoV-2019_71_LEFT\tNOINT\t+\n+MN908947.3\t21716\t21743\tnCoV-2019_71_RIGHT\tNOINT\t-\n+MN908947.3\t21658\t21682\tnCoV-2019_72_LEFT\tNOINT\t+\n+MN908947.3\t22013\t22038\tnCoV-2019_72_RIGHT\tNOINT\t-\n+MN908947.3\t21961\t21990\tnCoV-2019_73_LEFT\tNOINT\t+\n+MN908947.3\t22324\t22346\tnCoV-2019_73_RIGHT\tNOINT\t-\n+MN908947.3\t22262\t22290\tnCoV-2019_74_LEFT\tNOINT\t+\n+MN908947.3\t22626\t22650\tnCoV-2019_74_RIGHT\tNOINT\t-\n+MN908947.3\t22516\t22542\tnCoV-2019_75_LEFT\tNOINT\t+\n+MN908947.3\t22877\t22903\tnCoV-2019_75_RIGHT\tNOINT\t-\n+MN908947.3\t22797\t22819\tnCoV-2019_76_LEFT\tNOINT\t+\n+MN908947.3\t23192\t23214\tnCoV-2019_76_RIGHT\tNOINT\t-\n+MN908947.3\t23122\t23144\tnCoV-2019_77_LEFT\tNOINT\t+\n+MN908947.3\t23500\t23522\tnCoV-2019_77_RIGHT\tNOINT\t-\n+MN908947.3\t23443\t23466\tnCoV-2019_78_LEFT\tNOINT\t+\n+MN908947.3\t23822\t23847\tnCoV-2019_78_RIGHT\tNOINT\t-\n+MN908947.3\t23789\t23812\tnCoV-2019_79_LEFT\tNOINT\t+\n+MN908947.3\t24145\t24169\tnCoV-2019_79_RIGHT\tNOINT\t-\n+MN908947.3\t24078\t24100\tnCoV-2019_80_LEFT\tNOINT\t+\n+MN908947.3\t24443\t24467\tnCoV-2019_80_RIGHT\tNOINT\t-\n+MN908947.3\t24391\t24416\tnCoV-2019_81_LEFT\tNOINT\t+\n+MN908947.3\t24765\t24789\tnCoV-2019_81_RIGHT\tNOINT\t-\n+MN908947.3\t24696\t24721\tnCoV-2019_82_LEFT\tNOINT\t+\n+MN908947.3\t25052\t25076\tnCoV-2019_82_RIGHT\tNOINT\t-\n+MN908947.3\t24978\t25003\tnCoV-2019_83_LEFT\tNOINT\t+\n+MN908947.3\t25347\t25369\tnCoV-2019_83_RIGHT\tNOINT\t-\n+MN908947.3\t25279\t25301\tnCoV-2019_84_LEFT\tNOINT\t+\n+MN908947.3\t25646\t25673\tnCoV-2019_84_RIGHT\tNOINT\t-\n+MN908947.3\t25601\t25623\tnCoV-2019_85_LEFT\tNOINT\t+\n+MN908947.3\t25969\t25994\tnCoV-2019_85_RIGHT\tNOINT\t-\n+MN908947.3\t25902\t25924\tnCoV-2019_86_LEFT\tNOINT\t+\n+MN908947.3\t26290\t26315\tnCoV-2019_86_RIGHT\tNOINT\t-\n+MN908947.3\t26197\t26219\tnCoV-2019_87_LEFT\tNOINT\t+\n+MN908947.3\t26566\t26590\tnCoV-2019_87_RIGHT\tNOINT\t-\n+MN908947.3\t26520\t26542\tnCoV-2019_88_LEFT\tNOINT\t+\n+MN908947.3\t26890\t26913\tnCoV-2019_88_RIGHT\tNOINT\t-\n+MN908947.3\t26835\t26857\tnCoV-2019_89_LEFT\tNOINT\t+\n+MN908947.3\t27202\t27227\tnCoV-2019_89_RIGHT\tNOINT\t-\n+MN908947.3\t27141\t27164\tnCoV-2019_90_LEFT\tNOINT\t+\n+MN908947.3\t27511\t27533\tnCoV-2019_90_RIGHT\tNOINT\t-\n+MN908947.3\t27446\t27471\tnCoV-2019_91_LEFT\tNOINT\t+\n+MN908947.3\t27825\t27854\tnCoV-2019_91_RIGHT\tNOINT\t-\n+MN908947.3\t27784\t27808\tnCoV-2019_92_LEFT\tNOINT\t+\n+MN908947.3\t28145\t28172\tnCoV-2019_92_RIGHT\tNOINT\t-\n+MN908947.3\t28081\t28104\tnCoV-2019_93_LEFT\tNOINT\t+\n+MN908947.3\t28442\t28464\tnCoV-2019_93_RIGHT\tNOINT\t-\n+MN908947.3\t28394\t28416\tnCoV-2019_94_LEFT\tNOINT\t+\n+MN908947.3\t28756\t28779\tnCoV-2019_94_RIGHT\tNOINT\t-\n+MN908947.3\t28677\t28699\tnCoV-2019_95_LEFT\tNOINT\t+\n+MN908947.3\t29041\t29063\tnCoV-2019_95_RIGHT\tNOINT\t-\n+MN908947.3\t28985\t29007\tnCoV-2019_96_LEFT\tNOINT\t+\n+MN908947.3\t29356\t29378\tnCoV-2019_96_RIGHT\tNOINT\t-\n+MN908947.3\t29288\t29316\tnCoV-2019_97_LEFT\tNOINT\t+\n+MN908947.3\t29665\t29693\tnCoV-2019_97_RIGHT\tNOINT\t-\n+MN908947.3\t29486\t29510\tnCoV-2019_98_LEFT\tNOINT\t+\n+MN908947.3\t29836\t29866\tnCoV-2019_98_RIGHT\tNOINT\t-\n' |