code: def samtools_view(self, file_name, param, postpend=""):
          
          cmd = "{} view {} {} {}".format(
                  self.tools.samtools, param, file_name, postpend)
          return subprocess.check_output(cmd, shell=True)
docs: Run samtools view, with flexible parameters and post-processing.
  
          This is used internally to implement the various count_reads functions.
  
          :param str file_name: file_name
          :param str param: String of parameters to pass to samtools view
          :param str postpend: String to append to the samtools command;
              useful to add cut, sort, wc operations to the samtools view output.