Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sfletc committed Apr 26, 2023
1 parent dd6b040 commit d528441
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
12 changes: 4 additions & 8 deletions cmd/align.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,10 @@ scramAligner align -r ref.fa -1 seq1a.fa,seq1b.fa,seq1c.fa -l 21,22,24 -o testAl
t0 := time.Now()
var a map[string]interface{}
var fileOrder []string
switch {
case !indv:
fmt.Println("\nLoading mean and standard errors of replicate reads")
a = scramPkg.SeqLoad(strings.Split(fastaSet1, ","), readFileType, adapter, minLen, maxLen, minCount, noNorm)
case indv:
fmt.Println("\nLoading individual read counts")
a, fileOrder = scramPkg.IndvSeqLoad(strings.Split(fastaSet1, ","), readFileType, adapter, minLen, maxLen, minCount, noNorm)
}

fmt.Println("\nLoading individual read counts")
a, fileOrder = scramPkg.IndvSeqLoad(strings.Split(fastaSet1, ","), readFileType, adapter, minLen, maxLen, minCount, noNorm)

fmt.Println("\nLoading reference")
c := scramPkg.RefLoad(alignTo)
for _, nt := range strings.Split(length, ",") {
Expand Down
3 changes: 1 addition & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
"github.com/spf13/viper"
)

const version = "2.0.1"
const version = "2.0.4"

var cfgFile string
var fastaSet1 string
Expand All @@ -52,7 +52,6 @@ var maxLen int
var minCount float64
var adapter string
var noNorm bool
var indv bool

var RootCmd = &cobra.Command{
Use: "scram2",
Expand Down
8 changes: 5 additions & 3 deletions scramScripts/scram2Plot/src/scram2Plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def __eq__(self, other): #TODO: update
and np.array_equal(self.rvs, other.rvs)
)

def profile_plot(align_prefix, align_lens, header, smoothing_window=1, cov = True, abund=True, se = True, save=True, ylim_set=(0,0)):
def align_plot(align_prefix, align_lens, header, smoothing_window=1, cov = True, abund=True, se = True, save=True, ylim_set=(0,0)):
"""
"""
Expand All @@ -284,7 +284,7 @@ def profile_plot(align_prefix, align_lens, header, smoothing_window=1, cov = Tru
if se:
plt.legend()
if save:
save_file = align_prefix+header+".png"
save_file = align_prefix+"_"+header+".png"
plt.savefig(save_file)
plt.show()

Expand Down Expand Up @@ -354,7 +354,9 @@ def main():
parser.add_argument("-y", "--ylim", help="Set y-axis limit", type=int, nargs=2, default=(0,0))
parser.add_argument("-n", "--no_save", help="Do not save plot", action="store_true")
args = parser.parse_args()
profile_plot(
if args.abundance:
args.coverage = True
align_plot(
args.align_prefix,
args.align_lens,
args.header,
Expand Down
4 changes: 3 additions & 1 deletion scramScripts/scram2Plot/src/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@
'pandas>=1.4.0',
'seaborn>=0.12.0',
'numpy>=1.23.0',
# Add more dependencies as needed
],
entry_points={
'console_scripts': [
'scram2Plot=scram2Plot:main',
],
'scram2Plot': [
'scram2Plot=scram2Plot',
]
},
classifiers=[
'Development Status :: 3 - Alpha',
Expand Down

0 comments on commit d528441

Please sign in to comment.