We can check the “re-created” database to find out if the masking information was added properly, using blastdbcmd with the following command line: $ blastdbcmd -db hs_chr -info To use the original FASTA sequence file (hs_chr.fa) as the input, we need to use “-in hs_chr.fa” to instruct makeblastdb to use that FASTA file instead. Here, we use the existing BLAST database as input file (-in hs_chr), specify its type (-dbtype nucl), enable parsing of sequence ids (-parse_seqids), provide the masking data (-mask_data hs_chr_mask.asnb), and name the output database with the same base name (-out hs_chr) overwriting the existing one. mask_data hs_chr_mask.asnb -out hs_chr -title \ To use the FASTA file hs_chr.fa, we change the input file name and file type: $ windowmasker -in hs_chr.fa -infmt fasta -ustat hs_chr.counts \Ĭreate BLAST database with masking information using an existing BLAST database or FASTA sequence file as inputįor example, we can use the following command line to apply the masking information, created above, to the existing BLAST database generated in Obtaining sample data for this cookbook entry: $ makeblastdb -in hs_chr –input_type blastdb -dbtype nucl -parse_seqids \ We set the mask file format to binary asn.1 (-outfmt maskinfo_asn1_bin), enable the sequence ids parsing (-parse_seqids), and save the masking data to hs_chr_mask.asnb (-out hs_chr_mask.asnb). Here we need to use the same input (-in hs_chr -infmt blastdb) and the output of step 1 (-ustat hs_chr_unts). outfmt maskinfo_asn1_bin -parse_seqids -out hs_chr_mask.asnb With the counts file we can then proceed to create the file containing the masking information as follows: $ windowmasker -in hs_chr -infmt blastdb -ustat hs_chr_unt \ To use the FASTA file hs_chr.fa to generate the counts, we need to change the input file name and format: $ windowmasker -in hs_chr.fa -infmt fasta -mk_counts \ Here we specify the input BLAST database (-in hs_chr -infmt blastdb), request it to generate the counts (-mk_counts) with sequence id parsing (-parse_seqids), and save the output to a file named hs_chr_unts (-out hs_chr_unts).
To generate the masking information using windowmasker from the BLAST database hs_chr, we first need to generate a counts file: $ windowmasker -in hs_chr -infmt blastdb -mk_counts \ Create masking information using windowmasker