From 62f59544e600dc2db7cbd2356ec304f30368a055 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Thu, 12 Nov 2020 10:17:48 +0200 Subject: [PATCH 1/3] Remove executable bit from source files Having them with +x makes the shell autocomplete them when the dir is in the user's $PATH, which is an unnecessary nuissance. --- break_contigs.cpp | 0 break_contigs_start.cpp | 0 cmdline.h | 0 correct_links.cpp | 0 4 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 break_contigs.cpp mode change 100755 => 100644 break_contigs_start.cpp mode change 100755 => 100644 cmdline.h mode change 100755 => 100644 correct_links.cpp diff --git a/break_contigs.cpp b/break_contigs.cpp old mode 100755 new mode 100644 diff --git a/break_contigs_start.cpp b/break_contigs_start.cpp old mode 100755 new mode 100644 diff --git a/cmdline.h b/cmdline.h old mode 100755 new mode 100644 diff --git a/correct_links.cpp b/correct_links.cpp old mode 100755 new mode 100644 From 832c02af2e3b70b65bf7eaa73a4c78ced50eb4f5 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Thu, 12 Nov 2020 10:20:02 +0200 Subject: [PATCH 2/3] run_pipeline.py: Add executable bit This allows the shell to autocomplete the name of the script like any other executable when the SALSA dir is in the user's $PATH. --- run_pipeline.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 run_pipeline.py diff --git a/run_pipeline.py b/run_pipeline.py old mode 100644 new mode 100755 From c8c26d25e66afca2ffb68f827f6e8a2502346f1c Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Thu, 12 Nov 2020 10:21:54 +0200 Subject: [PATCH 3/3] Add python2 shebang to all Python scripts These scripts are already executable due to their chmod +x, but they are missing a shebang to tell the shell which interpreter is respons- ible for executing them. The convention is to use the "env" command to find an appropriate Python that may be in the user's environment instead of hard coding a path, as the user might have a virtual env loaded or might have Python 3 as the default "python" on the system. --- RE_sites.py | 1 + alignments2txt.py | 2 ++ correct.py | 2 ++ fast_scaled_scores.py | 4 +++- get_seq.py | 2 ++ layout_unitigs.py | 2 ++ make_links.py | 2 ++ refactor_breaks.py | 2 ++ run_pipeline.py | 2 ++ stitch.py | 2 ++ 10 files changed, 20 insertions(+), 1 deletion(-) diff --git a/RE_sites.py b/RE_sites.py index 9c1e40c..7a63ce5 100755 --- a/RE_sites.py +++ b/RE_sites.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python2 import re import sys diff --git a/alignments2txt.py b/alignments2txt.py index 382d2b7..be8c755 100755 --- a/alignments2txt.py +++ b/alignments2txt.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python2 + import os,sys import argparse import pickle diff --git a/correct.py b/correct.py index 9f3e75a..678f922 100755 --- a/correct.py +++ b/correct.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python2 + import sys #reads input assembly, breakpoints given by the method and outputs new contig file with lengths diff --git a/fast_scaled_scores.py b/fast_scaled_scores.py index 3b2a2ad..633f9a8 100755 --- a/fast_scaled_scores.py +++ b/fast_scaled_scores.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python2 + import networkx as nx import sys import argparse @@ -86,4 +88,4 @@ def get_max_weight(start,end): #print str(u)+'\t'+str(v)+'\t'+str(w)+'\t'+str(bestAlt)+'\t'+str(w/bestAlt)+'\t'+str("FALSE")+'\t'+str("FALSE")+'\t'+str("FALSE") #print "%s %s %f %f %f %d %s %s"%(u, v, d, bestAlt, d/bestAlt, G[u][v]['links'],G[u][v]['isNeighbor'], G[u][v]['isGood']) ofile.close() -f1.close() \ No newline at end of file +f1.close() diff --git a/get_seq.py b/get_seq.py index 399ef07..9161f31 100755 --- a/get_seq.py +++ b/get_seq.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python2 + import pickle import argparse diff --git a/layout_unitigs.py b/layout_unitigs.py index d2964b9..a1d1efa 100755 --- a/layout_unitigs.py +++ b/layout_unitigs.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python2 + import networkx as nx import sys import operator diff --git a/make_links.py b/make_links.py index b953f66..d6fc949 100755 --- a/make_links.py +++ b/make_links.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python2 + import operator import math import sys diff --git a/refactor_breaks.py b/refactor_breaks.py index a16a4a9..695ffa9 100755 --- a/refactor_breaks.py +++ b/refactor_breaks.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python2 + import os,sys import argparse import pickle diff --git a/run_pipeline.py b/run_pipeline.py index c73a42d..25d0195 100755 --- a/run_pipeline.py +++ b/run_pipeline.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python2 + import os import stat import argparse diff --git a/stitch.py b/stitch.py index 6ce12f7..a231da0 100755 --- a/stitch.py +++ b/stitch.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python2 + import argparse,pickle parser = argparse.ArgumentParser()