Last active
December 7, 2020 14:28
-
-
Save mutterer/a7f2da3f3a4937cbd86279259e698cdb to your computer and use it in GitHub Desktop.
import_ab1_sequence_csv_from_cutepeaks.ijm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// cutepeaks exports ab1 files as tab delimited csv | |
// this macro replaces tabs with commas | |
// reopens peaks file | |
// and builds a nucleotide plot | |
// v 1.0 : 20201109 | |
// 1.1 : 20201207 handles csv files with different columns ordering | |
s=File.openAsString(""); | |
name = File.name; | |
s=s.replace('\t',','); | |
f=File.open(getDirectory('imagej')+"fixed.csv"); | |
print(f,s); | |
File.close(f); | |
open(getDirectory('imagej')+"fixed.csv"); | |
Table.rename("fixed.csv", name); | |
h=split(Table.headings,"\t"); | |
for (i=0;i<4;i++) { | |
if (h[i].startsWith("#")) | |
Table.renameColumn(h[i], h[i].substring(1)); | |
} | |
Plot.create("Plot Peaks", "distance", "value"); | |
Plot.add("Line", Table.getColumn("G", name)); | |
Plot.setStyle(0, "black,#a0a0ff,1.0,Line"); | |
Plot.add("Line", Table.getColumn("A", name)); | |
Plot.setStyle(1, "green,#a0a0ff,1.0,Line"); | |
Plot.add("Line", Table.getColumn("T", name)); | |
Plot.setStyle(2, "red,#a0a0ff,1.0,Line"); | |
Plot.add("Line", Table.getColumn("C", name)); | |
Plot.setStyle(3, "blue,#a0a0ff,1.0,Line"); | |
Plot.setLimits(-20, 500, -100, 4000); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See tutorial here
example output