Create an output file which the result is a map
1
0
Entering edit mode
9.7 years ago

Hi!

I need to create an output file, the problem is that the output is a map of a sequence with restriction enzymes. I used this code:

cdna = Seq.Seq(sequence, IUPAC.unambiguous_dna)

anal=Restriction.Analysis(Restriction.CommOnly, cdna)
anal.print_as ("map")
anal.print_that()

print >> outputf, "Restriction map: \n", anal.print_that()

I don't know what I must do, replace anal.print_that() for...?

It's possible to create the output file with the map as it print in the terminal?

Thank you :)

python restriction-map biopython • 1.8k views
ADD COMMENT
0
Entering edit mode
9.7 years ago

I'm not too familiar with your particular analysis, but it looks like you can get the string representation of the map:

print >> outputf, "Restriction map: \n", anal.make_format("map")
                                         ^_____________________^
ADD COMMENT
0
Entering edit mode

It doesn't work, the error is:

print >> outputf, "Restriction map: \n", anal.make_format("map")
TypeError: _make_map() takes exactly 5 arguments (2 given)
ADD REPLY

Login before adding your answer.

Traffic: 2555 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6