This project is read-only.

Merging Code From Different Licenses

Apr 23, 2013 at 12:24 AM
Hi all,

I had a quick question for anyone who might have knowledge about software licensing issues. I have recently ported a library from Java to C# for reading variant calling format (or VCF) files. The C# VCF reader is a mixture of my own work and a reading of some Broad developed Java code to do this. The Java code was originally released under the MIT license, and I don't know if it is compatible with the Apache license, or even if it matters once you write it in a different language (essentially, I think it still needs to be open source available for anyone who might want to use it).

It seems like a VCF reader might be a good thing to have in .NET Bio, but I always want to avoid lawyers, does anyone have any thoughts on mixing these things?

Warm wishes,
Nigel
Apr 23, 2013 at 10:21 AM
Hi Nigel,

First: I am not a lawyer and so can't give you legal advice. As you will know though, some open source licenses stipulate that any derivative work be licensed in the same way as the original (GPL is an example) while others allow you to create a derivative work and license in any way you wish (BSD is an example).

It seems to me that you have a number of issues; the first is to determine whether the MIT license is of the former or latter type. If it is like BSD, perhaps you can license your derivative work as you wish - and in that case, you could choose the Apache 2.0 license and contribute your code to the .NET Bio project (which would be fantastic, I know Dong has asked for VCF parsing in the past). The second issue is the extent to which you own the intellectual property of the work you have done, and that depends on the circumstances of your employment - a reasonable guide to what is acceptable to your employer is whatever they have let you do in the past, so if you have previously released work under open source licenses, you are probably fine in that regard.

In short, you need to make sure the MIT license is compatible, and that your employer is okay with your contribution. In the former case you could also approach the authors of the original library and ask if they are okay with your contribution.

I'll see if I can find someone from Outercurve who may be able to help.

Simon
Apr 23, 2013 at 6:28 PM
Simon,

Thanks for the response, I talked to the original author a little while ago about this and he basically said that the MIT license was the most permissive around, and didn't particularly care what anyone did with the code as long as they didn't get sued later on for using their own code (I guess this has happened before).

I know this VCF related code is used in both the GATK and the Picard packages. It looks like Picard solved this problem by releasing their code under both the Apache and the MIT license, though a dual license seems rather annoying. Dong, do you still need a VCF parser?

If other people would find it useful, probably the easiest might be for me to just put it online under the MIT license as a separate project (the port is still a beta version), and then if it seems useful enough to warrant considering this more I can try to integrate into .NET bio after going through the effort of more formally verifying with all the involved parties.

Thanks again,
Nigel
Apr 23, 2013 at 8:50 PM
I am not a lawyer, but I know a man who is...

Well actually I know a bunch of lawyers who have advised the Apache Software Foundation with respect to license compatibility between licence X and the Apache Software License V2. The results of that advice can be found at [1]. Note that you can't treat that page as legal advice, but it is the page that records all decisions the ASF have made regarding licence compatibility.

You will see that the ASF allows MIT licenced code to be included in its projects.

Ross

[1] http://www.apache.org/legal/resolved.html
May 8, 2013 at 10:45 PM
Given that Ross was (is?) a VP of the Apache Foundation, I'm pretty confident that the Apache 2.0 license and the MIT license are compatible.

I can't speak for everyone on this project, but given this, I don't see any problem with accepting the VCF parser code into the project, if you would like to contribute it...

Simon
May 9, 2013 at 4:36 PM
Hi Ross and Simon,

Thanks for the response, and am very glad to hear that the MIT license is compatible with the Apache license foundation version. I will plan to contribute the code sometime soon. Right now the translation from Java->C# still has a lot of Java flotsam and jetsam lying around in the form of methods and classes that can be easily replaced by BCL function calls and LINQ expressions in C#, so I am still cleaning it up to make it more "C#-y" while keeping the syntax as compatible as possible with the GATK/Picard toolset.

If anyone need a VCF parser soon though, or wants to help test, just let me know.

Warm wishes,
Nigel
May 26, 2013 at 5:44 AM
For anyone who might be interested, I finished the VCF port and wrote up some performance comparisons with the java version here:

http://evolvedmicrobe.com/blogs/?p=71

I am suspecting there may be a policy against unsafe code in the repository.... though at least at the start it helped a lot.