Open decareano opened 5 years ago
Hi Marcello, Please see the note below "Rebasing the commits of this branch on top of the base branch cannot be performed automatically due to conflicts encountered while reapplying the individual commits from the head branch."
From reading the "command line instructions" it looks like you have to do the rebase "from your project repository". Please give it a try and message me to let me know how it went.
Cheers, Deena
Hi Deena,
Does open("chrMchr1New-"+str(x)+".fasta.eg", 'w') also create a file or did you have to create them, then open them in your script?
I am using the loop to iterate through the files you provided. it then writes the results of the parsing to a new file("chrMchr1New-"+str(x)+".fasta.eg", 'w')
Are opened files automatically read one line at a time? In this case, I convert them to a list and append the lines (one by one to the list)
I'm confused about the two uses of '/n'. First you seem to strip it: mylines.append(a_line.rstrip('\n')) You are right, don't needed here. Removed. rstrip with no args by default will remove the whitespace I think.
Then, does this line add it?: writer.writelines("%s\n" % i for i in mylines) If so, why strip it and add it back? I use it here for neater formatting purposes. If not, you get the sequences all bunched up.
Would you also please explain what the letters i stand for in the string formatting line below? writer.writelines("%s\n" % i for i in mylines) writelines() iterates over this sequence of strings (i) and writes every item. https://stackoverflow.com/questions/12377473/python-write-versus-writelines-and-concatenated-strings. For further info
The script "mitolin_split.py" will generate two new fasta.eg files with only ChrM data.