mapleforest / HaploMerger2

40 stars 6 forks source link

Batch scripts are missing shebang #12

Open fennerm opened 6 years ago

fennerm commented 6 years ago

hm.batch* don't have a shebang which causes issues if you call them from outside a bash script e.g from python.

mapleforest commented 6 years ago

Dear User,

HM2 is not designed to be run in that way, but you may modify it to suit your application.

在 2017/11/30 3:13, fennerm 写道:

hm.batch* don't have a shebang which causes issues if you call them from outside a bash script e.g from python.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mapleforest/HaploMerger2/issues/12, or mute the thread https://github.com/notifications/unsubscribe-auth/AOtnABj0e6m3s83JEzTmaf1uasggJD5sks5s7azTgaJpZM4QveoF.

--

best regards,

黄盛丰 Shengfeng Huang 中山大学生命科学学院 School of life sciences, Sun Yat-sen university hshengf2@mail.sysu.edu.cn http://sklbc.sysu.edu.cn/Team/User/info.aspx?typeid=283&pid=46


本邮件及其附件含有发送给特定个人和用于特定目的的保密信息。如果您不是预期的收件人,请立即删除本邮件并通知发件人。严禁任何非预期的收件人使用、传播、分发或复制本邮件或其附件。 This email and its attachments may contain confidential information intended for a specific individual and purpose. If you are not the intended recipient, you should delete this email and notify the sender immediately. Any use, dissemination, distribution, or copying of this email or its attachments by persons other than the intended recipient(s), is strictly prohibited.

fennerm commented 6 years ago

Fair enough. Is there any downside to adding the shebang though? Writing a custom batch script in perl or python seems like a fairly common use case.

mapleforest commented 6 years ago

I do not think so, but I did not test that.

The batch scripts just automated the perl scripts under HM2/bin, read though them and you know what they do. However, everything is supposed to run in a project directory under HM2's root directory. Besides, scripts under HM2/bin do not have the FindBin.

在 2017/11/30 7:56, fennerm 写道:

Fair enough. Is there any downside to adding the shebang though? Writing a custom batch script in perl or python seems like a fairly common use case.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mapleforest/HaploMerger2/issues/12#issuecomment-348036952, or mute the thread https://github.com/notifications/unsubscribe-auth/AOtnAIbQO_8Ag6HLpUh-ZTW4BkmAJeRTks5s7e87gaJpZM4QveoF.

--

best regards,

黄盛丰 Shengfeng Huang 中山大学生命科学学院 School of life sciences, Sun Yat-sen university hshengf2@mail.sysu.edu.cn http://sklbc.sysu.edu.cn/Team/User/info.aspx?typeid=283&pid=46


本邮件及其附件含有发送给特定个人和用于特定目的的保密信息。如果您不是预期的收件人,请立即删除本邮件并通知发件人。严禁任何非预期的收件人使用、传播、分发或复制本邮件或其附件。 This email and its attachments may contain confidential information intended for a specific individual and purpose. If you are not the intended recipient, you should delete this email and notify the sender immediately. Any use, dissemination, distribution, or copying of this email or its attachments by persons other than the intended recipient(s), is strictly prohibited.

fennerm commented 6 years ago

I understand, I'm talking about replacing the main batch script with a perl or python script. If these scripts then try to execute the hm.batch* scripts they will not necessarily default to executing them with bash without a shebang. Instead they will use the user's default shell which may be zsh etc.

If you're not interested in changing it, no problem. Just wanted to bring it to your attention in case it was unintentional. Thanks for developing Haplomerger2, very useful software!

mapleforest commented 6 years ago

Thank you. As you can see in the manual, I recommend explicit invocation with "sh ./hm.batch*".

I do this for reasons I explained above.

But I am sure for users who have highly customized demands, can easily adapt HM2 by modifying a couple of lines.

Feel free to contact me if you have any technical problems.

在 2017/12/1 5:46, fennerm 写道:

I understand, I'm talking about replacing the main batch script with a perl or python script. If these scripts then try to execute the hm.batch* scripts they will not necessarily default to executing them with bash without a shebang. Instead they will use the user's default shell which may be zsh etc.

If you're not interested in changing it, no problem. Just wanted to bring it to your attention in case it was unintentional. Thanks for developing Haplomerger2, very useful software!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mapleforest/HaploMerger2/issues/12#issuecomment-348331232, or mute the thread https://github.com/notifications/unsubscribe-auth/AOtnAG5L0WCv8BtlvjKK8Aw4HW04pp2Uks5s7yJHgaJpZM4QveoF.

--

best regards,

黄盛丰 Shengfeng Huang 中山大学生命科学学院 School of life sciences, Sun Yat-sen university hshengf2@mail.sysu.edu.cn http://sklbc.sysu.edu.cn/Team/User/info.aspx?typeid=283&pid=46


本邮件及其附件含有发送给特定个人和用于特定目的的保密信息。如果您不是预期的收件人,请立即删除本邮件并通知发件人。严禁任何非预期的收件人使用、传播、分发或复制本邮件或其附件。 This email and its attachments may contain confidential information intended for a specific individual and purpose. If you are not the intended recipient, you should delete this email and notify the sender immediately. Any use, dissemination, distribution, or copying of this email or its attachments by persons other than the intended recipient(s), is strictly prohibited.