I have a directory containing nearly 11 million small SNPs files: like this
wa_filtering_DP15_good_pops_snps_file_1
wa_filtering_DP15_good_pops_snps_file_2
.
.
.
wa_filtering_DP15_good_pops_snps_file_11232111
and each file has only 2 rows (first row allele count for the wild allele and second row allele count for the alternative allele) and 315 columns looks like this:
1 0 0 0 0 0 0 0 0 0 1 2 1
0 0 0 0 0 0 0 0 0 0 0 0 0
I want to go through each file and if in each column both rows have 0 values replace them with 9 and get something like this:
1 9 9 9 9 9 9 9 9 9 1 2 1
0 9 9 9 9 9 9 9 9 9 0 0 0
Can someone help me out to figure out how to do that? Thanks
Thanks so much @Pierre Lindenbaum, your code worked as well