I am trying to write output file but not getting any output in file.Using below code I am not able to write the data in output file. Please check my code: In this script i am trying to do some bioinformatics analysis. 1. The first line contains the name of the protein and the count of subsequent lines of output for this protein (say N) 2. Each of the next N lines contains a match information: the locations of the GBoxes and the actual matches (remember there are perturbations and X's, i.e. wild cards, that are allowed).
I am getting expected output but not able to write output data in file.
Script
def write_file(data):
file_name = r'C:\Users\Vishnu\Desktop\Hiral_project_analysis\output_1.txt'
with open(file_name, 'wb') as x_file:
x_file.write('{}'.format(data))
def run():
data = H(protein,x1,x2,x3,x4, protein_name)
write_file(data)
print) the value ofdatainrun()after callingH()? Note that you callH()in theforloop without capturing the return value, then you callrun()which also callsH()again.