Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Commit

Permalink
Ap11-219, AP11-220
Browse files Browse the repository at this point in the history
  • Loading branch information
PrzemyslawP committed Jun 26, 2013
1 parent 743faf4 commit ad7b5e0
Show file tree
Hide file tree
Showing 15 changed files with 12,389 additions and 12,371 deletions.
Binary file modified dist/codon_finder.jar
Binary file not shown.
Binary file modified dist/nucleotide_to_amino_acid.jar
Binary file not shown.
Binary file modified dist/protein_generator.jar
Binary file not shown.
Binary file modified dist/results_analyser.jar
Binary file not shown.
Binary file modified dist/samifier.jar
Binary file not shown.
Binary file modified dist/virtual_protein_merger.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion src/au/org/intersect/samifier/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

public interface Version {

String VERSION = "1.0.7";
String VERSION = "1.0.8";
}
8 changes: 7 additions & 1 deletion src/au/org/intersect/samifier/domain/GffOutputter.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public class GffOutputter implements Outputter {
private String directionFlag;
private String glimmerName;
private Set<String> virtualProteinNames;
private String origin;

public GffOutputter(ProteinLocation location,
String genomeFileNameWithExtension) {
Expand All @@ -26,6 +27,7 @@ public GffOutputter(ProteinLocation location,
this.directionFlag = location.getDirection();
this.glimmerName = location.getName();
this.virtualProteinNames = location.getVirtualProteinNames();
this.origin = location.getOrigin();
}

@Override
Expand All @@ -45,7 +47,11 @@ public String getOutput() {
private String getOutputLine(String type, boolean addParent) {
StringBuilder output = new StringBuilder();
output.append(genomeFileName);
column(output, "Glimmer");
if (origin != null && origin.length() >0 ) {
column(output, origin);
} else {
column(output, "Glimmer");
}
column(output, type);
column(output, Integer.toString(start));
column(output, Integer.toString(end));
Expand Down
11 changes: 10 additions & 1 deletion src/au/org/intersect/samifier/domain/ProteinLocation.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ public class ProteinLocation implements Comparable<ProteinLocation> {

private String frame;
private String peptideAbsoluteStartStop;

private Set<String> virtualProteinNames;
private String origin;

public ProteinLocation(String name, int startIndex, int length,
String direction, String frame) {
Expand Down Expand Up @@ -128,4 +129,12 @@ public String getAbsoluteStartStop() {
return peptideAbsoluteStartStop;
}

public String getOrigin() {
return origin;
}

public void setOrigin(String origin) {
this.origin = origin;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,11 @@ private void addLocations(List<ProteinLocation> locations, int start,
+ (isForward ? "+" : "-") + (subIndex + 1);
int length = endIndex - startIndex + 1;
String frame = Integer.toString(subIndex + 1);
locations.add(new ProteinLocation(name, startIndex, length,
ProteinLocation location = new ProteinLocation(name, startIndex, length,
isForward ? GenomeConstant.FORWARD_FLAG
: GenomeConstant.REVERSE_FLAG, frame, null, null, chromosome));
: GenomeConstant.REVERSE_FLAG, frame, null, null, chromosome);
location.setOrigin("VPGenerator");
locations.add(location);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ public List<ProteinLocation> doGenerateLocations()
geneInfo.getDirectionStr(), "0", peptideSearchResult.getConfidenceScore(),
peptideSearchResult.getProteinName() + "(" + (virtualGeneStart + 1) + "-" + (virtualGeneStop + 1) + ")", geneInfo.getChromosome());
loc.setAbsoluteStartStop(getStartPosition(startPosition, stopPosition) + "_" + Math.abs(stopOffset - startOffset));
loc.setOrigin("VPMerger");
proteinLocations.add(loc);
}
return proteinLocations;
Expand Down
2 changes: 1 addition & 1 deletion src/au/org/intersect/samifier/runner/SamifierRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public void createSAM(List<PeptideSearchResult> peptideSearchResults,
}
output.write("@HD\tVN:1.0\n");
for (String chromosome : chromosomes) {
output.write("@SQ\tSN:" + chromosome + "\tLN:" + ((sequenceGenerator.getFastaParser().getChromosomeLength(chromosome)) / 3) + "\n");
output.write("@SQ\tSN:" + chromosome + "\tLN:" + ((sequenceGenerator.getFastaParser().getChromosomeLength(chromosome))) + "\n");
}

for (SAMEntry samEntry : samEntries) {
Expand Down
6 changes: 3 additions & 3 deletions test/resources/expected.sam
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@HD VN:1.0
@SQ SN:chrI LN:76739
@SQ SN:chrIV LN:510644
@SQ SN:chrXVI LN:344654
@SQ SN:chrI LN:230218
@SQ SN:chrIV LN:1531933
@SQ SN:chrXVI LN:1033964
KPYK1_YEAST.q131_p1 0 chrI 71969 40 21M = 0 0 TCTGTCATTGACAACGCCAGA *
KPYK1_YEAST.q217_p1 0 chrI 73163 37 21M * 0 0 ATCAACTTCGGTATTGAAAAG *
KPYK1_YEAST.q21_p1 0 chrI 73190 25 18M * 0 0 GAATTCGGTATCTTGAAG *
Expand Down
4 changes: 2 additions & 2 deletions test/resources/expected_filtered.sam
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@HD VN:1.0
@SQ SN:chrI LN:76739
@SQ SN:chrIV LN:510644
@SQ SN:chrI LN:230218
@SQ SN:chrIV LN:1531933
KPYK1_YEAST.q131_p1 0 chrI 71969 40 21M = 0 0 TCTGTCATTGACAACGCCAGA *
KPYK1_YEAST.q217_p1 0 chrI 73163 37 21M * 0 0 ATCAACTTCGGTATTGAAAAG *
RL31A_YEAST.q1009_p2 0 chrIV 322256 52 27M = 0 0 GAATACACCATTAACTTGCACAAAAGA *
Expand Down
Loading

0 comments on commit ad7b5e0

Please sign in to comment.