Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hsp alignment download reformat #603

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
579a1cc
Reformatted download of HSP alignments
iQuxLE Jun 3, 2022
81c2c17
Reformatted download of HSP alignments
iQuxLE Jun 3, 2022
ddd519b
Delete spec/dotdir/0edebfc5-022a-4606-9f0e-d732c18f8fc4 directory
iQuxLE Jun 5, 2022
22dcf79
Delete spec/dotdir/285929c2-d8cb-40bc-b9f3-b2f39a3a734b directory
iQuxLE Jun 5, 2022
f2fc298
Delete spec/dotdir/63fbc4fa-e907-4e36-8084-1bdecb83d111 directory
iQuxLE Jun 5, 2022
d0537e8
Delete spec/dotdir/82299932-3c06-4fe3-a9c2-48f881ec7c31 directory
iQuxLE Jun 5, 2022
f6bad5b
Delete spec/dotdir/aedbd8ce-def2-425a-9ac2-d860b885d85a directory
iQuxLE Jun 5, 2022
d59f6fb
Delete spec/dotdir/ca6267c5-bd73-4a99-b2a4-4ea44568b25e directory
iQuxLE Jun 5, 2022
e4d6924
Delete spec/dotdir/e5d0fb5e-6496-416a-8a51-07bacd1c9b4c directory
iQuxLE Jun 5, 2022
0ec7fc5
Delete spec/dotdir/e9f40618-7502-4101-aa75-aec8c358bc71 directory
iQuxLE Jun 5, 2022
fed060a
Update sp_P04637_P53_HUMAN_gi_1099170394_ref_XP_018868681_1.txt
iQuxLE Jun 6, 2022
c6cf96b
Update sp_P04637_P53_HUMAN_gi_395440626_gb_JQ694049_1.txt
iQuxLE Jun 6, 2022
9321f70
Update MH011443_1_gi_1528997474_gb_MH447967_1.txt
iQuxLE Jun 6, 2022
e93845a
Update MH011443_1_gi_1486783307_gb_AYF55702_1.txt
iQuxLE Jun 6, 2022
661e9dc
Update MH011443_1_gi_1486783306_gb_MH011443_1.txt
iQuxLE Jun 6, 2022
87f3f8c
Update alignment-40_hits_tblastn.txt
iQuxLE Jun 6, 2022
d0c8ec8
Update alignment-40_hits_blastx.txt
iQuxLE Jun 6, 2022
f8560c4
Update alignment-40_hits_blastp.txt
iQuxLE Jun 6, 2022
d4193c5
Update alignment-40_hits_blastn.txt
iQuxLE Jun 6, 2022
8530f71
Update alignment-4_hits.txt
iQuxLE Jun 6, 2022
52ecf9c
Update alignment-4_hits.txt
iQuxLE Jun 6, 2022
5942ab4
Update alignment-4_hits_tblastn.txt
iQuxLE Jun 6, 2022
264ace6
Update alignment-4_hits_blastx.txt
iQuxLE Jun 6, 2022
ce93aa7
Update alignment-4_hits_blastp.txt
iQuxLE Jun 6, 2022
75bcbb0
Update alignment-4_hits_blastn.txt
iQuxLE Jun 6, 2022
df46569
Update alignment-40_hits_tblastx.txt
iQuxLE Jun 6, 2022
085187c
Update alignment-40_hits_tblastx.txt
iQuxLE Jun 6, 2022
a4d330a
Update alignment-40_hits_tblastx.txt
iQuxLE Jun 6, 2022
a4123be
Update alignment-40_hits_tblastx.txt
iQuxLE Jun 7, 2022
79e81ef
Update alignment-40_hits_tblastx.txt
iQuxLE Jun 7, 2022
e4a1788
Update alignment-4_hits_tblastx.txt
iQuxLE Jun 7, 2022
914f8b4
Update .codeclimate.yml
iQuxLE Jun 30, 2022
a28f9f1
Update .codeclimate.yml
iQuxLE Jun 30, 2022
408741a
Update .codeclimate.yml
iQuxLE Jun 30, 2022
e9ef72b
Update .codeclimate.yml
iQuxLE Jun 30, 2022
1cdd214
Update .codeclimate.yml
iQuxLE Jun 30, 2022
1f05bdf
Update .codeclimate.yml
iQuxLE Jul 1, 2022
515d145
Update .codeclimate.yml
iQuxLE Jul 1, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,41 @@ plugins:
enabled: true
stylelint:
enabled: true
duplication:
enabled: true
# dump_ast and debug are optional for debugging to show the parsing tree
config:
# dump_ast: true
# debug: true
languages:
javascript:
# Filter for sidebar.js to prevent duplication call by the following pattern
# Reads like this: "An ExpressionStatement node, with a expression node and an
# AssignmentExpression node with any value, that contains a left MemberExpression node
# with an object and any Identifier and a property with any Identifier plus a right
# MemberExpression node with an object and any Identifier and a property with any Identifier
filters:
- "(ExpressionStatement (expression (AssignmentExpression _ (left(MemberExpression\
(object (Identifier _))(property (Identifier _))false))(right(MemberExpression(object\
(Identifier _))(property (Identifier _))false)))))"

# Filter parsing tree explicitly for the generate_fasta function inside alignment_exporter.js
# to prevent duplication call
- "(ExpressionStatement(expression(AssignmentExpression _(left(Identifier _))(right\
(BinaryExpression(left(BinaryExpression(left(BinaryExpression(left(BinaryExpression(left(BinaryExpression\
(left(BinaryExpression(left(BinaryExpression(left(BinaryExpression(left(BinaryExpression(left(BinaryExpression(left\
(StringLiteral _ _ _))_(right(MemberExpression(object (Identifier _))(property (Identifier _))false))))_(right\
(StringLiteral _ _ _))))_(right(MemberExpression(object (Identifier _))(property (Identifier _))false))))_(right\
(StringLiteral _ _ _))))_(right(MemberExpression(object (Identifier _))(property (Identifier _))false))))_(right\
(StringLiteral _ _ _))))_(right(MemberExpression(object (Identifier _))(property (Identifier _))false))))_\
(right, (StringLiteral _ _ _))))_(right(CallExpression(callee (Identifier _))(arguments(MemberExpression\
(object (Identifier _))(property (Identifier _))false))))))_(right (StringLiteral _ _ _)))))))"

# 45 is default from codeclimate as long as there is no explicit reason to change, we should keep it
mass_threshold: 45
ruby:
# default from codeclimate
mass_threshold: 25
exclude_patterns:
- public/css/sequenceserver.min.css
- public/sequenceserver-*.min.js
Expand Down
10 changes: 6 additions & 4 deletions public/js/alignment_exporter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as Exporter from './exporter';
import _ from 'underscore';
import { toLetters } from './visualisation_helpers';
export default class AlignmentExporter {
constructor() {}

Expand All @@ -23,12 +24,13 @@ export default class AlignmentExporter {
var fasta = '';

_.each(hsps, _.bind(function (hsp) {
fasta += '>'+hsp.query_id+':'+hsp.qstart+'-'+hsp.qend+'\n';
fasta += '>'+hsp.query_id+':'+hsp.qstart+'-'+hsp.qend+'_hit_'+hsp.hit_number+'_hsp_'+toLetters(hsp.number)+'\n';
fasta += hsp.qseq+'\n';
fasta += '>'+hsp.query_id+':'+hsp.qstart+'-'+hsp.qend+'_alignment_'+hsp.hit_id+':'+hsp.sstart+'-'+hsp.send+'\n';
fasta += '>'+hsp.query_id+':'+hsp.qstart+'-'+hsp.qend+'_hit_'+hsp.hit_number+'_hsp_'+toLetters(hsp.number)+
'_alignment_'+hsp.hit_id+':'+hsp.sstart+'-'+hsp.send+'\n';
fasta += hsp.midline+'\n';
fasta += '>'+hsp.hit_id+':'+hsp.sstart+'-'+hsp.send+'\n';
fasta += hsp.sseq+'\n';
fasta += '>'+hsp.hit_id+':'+hsp.sstart+'-'+hsp.send+'_hit_'+hsp.hit_number+'_hsp_'+toLetters(hsp.number)+'\n';
fasta += hsp.sseq+'\n\n';
}, this));
return fasta;
}
Expand Down
1 change: 1 addition & 0 deletions public/js/hit.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export default class extends Component {
var hsps = _.map(this.props.hit.hsps, _.bind(function (hsp) {
hsp.query_id = this.props.query.id;
hsp.hit_id = this.props.hit.id;
hsp.hit_number = this.props.hit.number;
return hsp;
}, this));

Expand Down
2 changes: 2 additions & 0 deletions public/js/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export default class extends Component {
hit.hsps.forEach((hsp) => {
hsp.query_id = query.id;
hsp.hit_id = hit.id;
hsp.hit_number = hit.number;
hsps_arr.push(hsp);
});
}
Expand All @@ -91,6 +92,7 @@ export default class extends Component {
_.each(hit.hsps, function (hsp) {
hsp.hit_id = hit.id;
hsp.query_id = query.id;
hsp.hit_number = hit.number;
hsps_arr.push(hsp);
});
}
Expand Down
8 changes: 4 additions & 4 deletions public/sequenceserver-report.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/sequenceserver-search.min.js

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions spec/sequences/MH011443_1_gi_1486783306_gb_MH011443_1.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
>MH011443.1:1-123
>MH011443.1:1-123_hit_1_hsp_a
TGGGTTGATTCCACACCCCCGCCCGGCACCCGCGTCCGCGCCGTGGCCATCTACAAGCAGTCACAGCACATGACGGAGGTTGTGAGGCGCTGCCCCCACCATGAGCGCTGCTCAGATAGCGAT
>MH011443.1:1-123_alignment_gi|1486783306|gb|MH011443.1|:1-123
>MH011443.1:1-123_hit_1_hsp_a_alignment_gi|1486783306|gb|MH011443.1|:1-123
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
>gi|1486783306|gb|MH011443.1|:1-123
>gi|1486783306|gb|MH011443.1|:1-123_hit_1_hsp_a
TGGGTTGATTCCACACCCCCGCCCGGCACCCGCGTCCGCGCCGTGGCCATCTACAAGCAGTCACAGCACATGACGGAGGTTGTGAGGCGCTGCCCCCACCATGAGCGCTGCTCAGATAGCGAT

7 changes: 4 additions & 3 deletions spec/sequences/MH011443_1_gi_1486783307_gb_AYF55702_1.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
>MH011443.1:1-123
>MH011443.1:1-123_hit_1_hsp_a
WVDSTPPPGTRVRAVAIYKQSQHMTEVVRRCPHHERCSDSD
>MH011443.1:1-123_alignment_gi|1486783307|gb|AYF55702.1|:1-41
>MH011443.1:1-123_hit_1_hsp_a_alignment_gi|1486783307|gb|AYF55702.1|:1-41
WVDSTPPPGTRVRAVAIYKQSQHMTEVVRRCPHHERCSDSD
>gi|1486783307|gb|AYF55702.1|:1-41
>gi|1486783307|gb|AYF55702.1|:1-41_hit_1_hsp_a
WVDSTPPPGTRVRAVAIYKQSQHMTEVVRRCPHHERCSDSD

35 changes: 20 additions & 15 deletions spec/sequences/MH011443_1_gi_1528997474_gb_MH447967_1.txt
Original file line number Diff line number Diff line change
@@ -1,30 +1,35 @@
>MH011443.1:1-123
>MH011443.1:1-123_hit_2_hsp_a
WVDSTPPPGTRVRAVAIYKQSQHMTEVVRRCPHHERCSDSD
>MH011443.1:1-123_alignment_gi|1528997474|gb|MH447967.1|:34-156
>MH011443.1:1-123_hit_2_hsp_a_alignment_gi|1528997474|gb|MH447967.1|:34-156
WVDSTPPPGTRVRA+AIYKQSQHMTEVVRRCPHHERCSDSD
>gi|1528997474|gb|MH447967.1|:34-156
>gi|1528997474|gb|MH447967.1|:34-156_hit_2_hsp_a
WVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSD
>MH011443.1:2-121

>MH011443.1:2-121_hit_2_hsp_b
RYLSSAHGGGSASQPPSCAVTACRWPRRGRGCRAGVWNQP
>MH011443.1:2-121_alignment_gi|1528997474|gb|MH447967.1|:35-154
>MH011443.1:2-121_hit_2_hsp_b_alignment_gi|1528997474|gb|MH447967.1|:35-154
RYLSSAHGGGSASQPPSCAVTACRWP RGRGCRAGVWNQP
>gi|1528997474|gb|MH447967.1|:35-154
>gi|1528997474|gb|MH447967.1|:35-154_hit_2_hsp_b
RYLSSAHGGGSASQPPSCAVTACRWPWRGRGCRAGVWNQP
>MH011443.1:3-122

>MH011443.1:3-122_hit_2_hsp_c
SLSEQRSWWGQRLTTSVMCCDCL*MATARTRVPGGGVEST
>MH011443.1:3-122_alignment_gi|1528997474|gb|MH447967.1|:36-155
>MH011443.1:3-122_hit_2_hsp_c_alignment_gi|1528997474|gb|MH447967.1|:36-155
SLSEQRSWWGQRLTTSVMCCDCL*MA ARTRVPGGGVEST
>gi|1528997474|gb|MH447967.1|:36-155
>gi|1528997474|gb|MH447967.1|:36-155_hit_2_hsp_c
SLSEQRSWWGQRLTTSVMCCDCL*MAMARTRVPGGGVEST
>MH011443.1:3-86

>MH011443.1:3-86_hit_2_hsp_d
G*FHTPARHPRPRRGHLQAVTAHDGGCE
>MH011443.1:3-86_alignment_gi|1528997474|gb|MH447967.1|:36-119
>MH011443.1:3-86_hit_2_hsp_d_alignment_gi|1528997474|gb|MH447967.1|:36-119
G*FHTPARHPRPR GHLQAVTAHDGGCE
>gi|1528997474|gb|MH447967.1|:36-119
>gi|1528997474|gb|MH447967.1|:36-119_hit_2_hsp_d
G*FHTPARHPRPRHGHLQAVTAHDGGCE
>MH011443.1:80-121

>MH011443.1:80-121_hit_2_hsp_e
L*GAAPTMSAAQIA
>MH011443.1:80-121_alignment_gi|1528997474|gb|MH447967.1|:113-154
>MH011443.1:80-121_hit_2_hsp_e_alignment_gi|1528997474|gb|MH447967.1|:113-154
L*GAAPTMSAAQIA
>gi|1528997474|gb|MH447967.1|:113-154
>gi|1528997474|gb|MH447967.1|:113-154_hit_2_hsp_e
L*GAAPTMSAAQIA

7 changes: 4 additions & 3 deletions spec/sequences/Query_1_SI2_2_0_06267.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
>Query_1:1-199
>Query_1:1-199_hit_1_hsp_a
MNTLWLSLWDYPGKLPLNFMVFDTKDDLQAAYWRDPYSIPLAVIFEDPQPISQRLIYEIRTNPSYTLPPPPTKLYSAPISCRKNKTGHWMDDILSIKTGESCPVNNYLHSGFLALQMITDITKIKLENSDVTIPDIKLIMFPKEPYTADWMLAFRVVIPLYMVLALSQFITYLLILIVGEKENKIKEGMKMMGLNDSVF
>Query_1:1-199_alignment_SI2.2.0_06267:1-199
>Query_1:1-199_hit_1_hsp_a_alignment_SI2.2.0_06267:1-199
MNTLWLSLWDYPGKLPLNFMVFDTKDDLQAAYWRDPYSIPLAVIFEDPQPISQRLIYEIRTNPSYTLPPPPTKLYSAPISCRKNKTGHWMDDILSIKTGESCPVNNYLHSGFLALQMITDITKIKLENSDVTIPDIKLIMFPKEPYTADWMLAFRVVIPLYMVLALSQFITYLLILIVGEKENKIKEGMKMMGLNDSVF
>SI2.2.0_06267:1-199
>SI2.2.0_06267:1-199_hit_1_hsp_a
MNTLWLSLWDYPGKLPLNFMVFDTKDDLQAAYWRDPYSIPLAVIFEDPQPISQRLIYEIRTNPSYTLPPPPTKLYSAPISCRKNKTGHWMDDILSIKTGESCPVNNYLHSGFLALQMITDITKIKLENSDVTIPDIKLIMFPKEPYTADWMLAFRVVIPLYMVLALSQFITYLLILIVGEKENKIKEGMKMMGLNDSVF

14 changes: 8 additions & 6 deletions spec/sequences/alignment-2_hits.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
>Query_1:1-199
>Query_1:1-199_hit_1_hsp_a
MNTLWLSLWDYPGKLPLNFMVFDTKDDLQAAYWRDPYSIPLAVIFEDPQPISQRLIYEIRTNPSYTLPPPPTKLYSAPISCRKNKTGHWMDDILSIKTGESCPVNNYLHSGFLALQMITDITKIKLENSDVTIPDIKLIMFPKEPYTADWMLAFRVVIPLYMVLALSQFITYLLILIVGEKENKIKEGMKMMGLNDSVF
>Query_1:1-199_alignment_SI2.2.0_06267:1-199
>Query_1:1-199_hit_1_hsp_a_alignment_SI2.2.0_06267:1-199
MNTLWLSLWDYPGKLPLNFMVFDTKDDLQAAYWRDPYSIPLAVIFEDPQPISQRLIYEIRTNPSYTLPPPPTKLYSAPISCRKNKTGHWMDDILSIKTGESCPVNNYLHSGFLALQMITDITKIKLENSDVTIPDIKLIMFPKEPYTADWMLAFRVVIPLYMVLALSQFITYLLILIVGEKENKIKEGMKMMGLNDSVF
>SI2.2.0_06267:1-199
>SI2.2.0_06267:1-199_hit_1_hsp_a
MNTLWLSLWDYPGKLPLNFMVFDTKDDLQAAYWRDPYSIPLAVIFEDPQPISQRLIYEIRTNPSYTLPPPPTKLYSAPISCRKNKTGHWMDDILSIKTGESCPVNNYLHSGFLALQMITDITKIKLENSDVTIPDIKLIMFPKEPYTADWMLAFRVVIPLYMVLALSQFITYLLILIVGEKENKIKEGMKMMGLNDSVF
>SI2.2.0_13722:1-186

>SI2.2.0_13722:1-186_hit_1_hsp_a
MSANRLNVLVTLMLAVALLVTESGNAQVDGYLQFNPKRSAVSSPQKYCGKKLSNALQIICDGVYNSMFKKSGQDFPPQNKRHIAHRINGNEEESFTTLKSNFLNWCVEVYHRHYRFVFVSEMEMADYPLAYDISPYLPPFLSRARARGMLDGRFAGRRYRRESRGIHEECCINGCTINELTSYCGP
>SI2.2.0_13722:1-186_alignment_SI2.2.0_13722:1-186
>SI2.2.0_13722:1-186_hit_1_hsp_a_alignment_SI2.2.0_13722:1-186
MSANRLNVLVTLMLAVALLVTESGNAQVDGYLQFNPKRSAVSSPQKYCGKKLSNALQIICDGVYNSMFKKSGQDFPPQNKRHIAHRINGNEEESFTTLKSNFLNWCVEVYHRHYRFVFVSEMEMADYPLAYDISPYLPPFLSRARARGMLDGRFAGRRYRRESRGIHEECCINGCTINELTSYCGP
>SI2.2.0_13722:1-186
>SI2.2.0_13722:1-186_hit_1_hsp_a
MSANRLNVLVTLMLAVALLVTESGNAQVDGYLQFNPKRSAVSSPQKYCGKKLSNALQIICDGVYNSMFKKSGQDFPPQNKRHIAHRINGNEEESFTTLKSNFLNWCVEVYHRHYRFVFVSEMEMADYPLAYDISPYLPPFLSRARARGMLDGRFAGRRYRRESRGIHEECCINGCTINELTSYCGP

Loading