Skip to content

Commit

Permalink
variant length options added
Browse files Browse the repository at this point in the history
  • Loading branch information
GMILLA92 committed Jan 26, 2024
1 parent 92fcdb1 commit 62fab25
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
12 changes: 12 additions & 0 deletions frontend/src/components/GenomicVariations/VariantsResults.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,18 @@ function VariantsResults (props) {
if (props.start2 !== '') {
requestParametersRange['start'] = props.start2
}
if (props.variantMinLength !== ''){
requestParametersRange['variantMinLength'] = props.variantMinLength
}
if (props.variantMaxLength !== ''){
requestParametersRange['variantMaxLength'] = props.variantMaxLength
}
if (props.variantMinLength2 !== ''){
requestParametersGene['variantMinLength'] = props.variantMinLength2
}
if (props.variantMaxLength2 !== ''){
requestParametersGene['variantMaxLength'] = props.variantMaxLength2
}
if (props.end !== '') {
requestParametersRange['end'] = props.end
}
Expand Down
62 changes: 62 additions & 0 deletions frontend/src/components/Layout/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ function Layout (props) {
const [assemblyId, setAssemblyId] = useState('')
const [assemblyId2, setAssemblyId2] = useState('')
const [assemblyId3, setAssemblyId3] = useState('')
const [variantMinLength, setVariantMinLength]= useState('')
const [variantMaxLength, setVariantMaxLength]= useState('')
const [variantMinLength2, setVariantMinLength2]= useState('')
const [variantMaxLength2, setVariantMaxLength2]= useState('')

const [sequenceSubmitted, setSequenceSub] = useState(false)
const [rangeSubmitted, setRangeSub] = useState(false)
Expand Down Expand Up @@ -373,6 +377,18 @@ function Layout (props) {
const handleChangeAssembly = e => {
setAssemblyId(e.target.value)
}
const handleChangeVariantMaxLength = e => {
setVariantMaxLength(e.target.value)
}
const handleChangeVariantMinLength = e => {
setVariantMinLength(e.target.value)
}
const handleChangeVariantMaxLength2 = e => {
setVariantMaxLength2(e.target.value)
}
const handleChangeVariantMinLength2 = e => {
setVariantMinLength2(e.target.value)
}

const handleClick = () => {
setShowBar(!showBar)
Expand Down Expand Up @@ -405,6 +421,8 @@ function Layout (props) {
setVariantType2('DEL')
}



useEffect(() => {
if (props.collection === 'Individuals') {
setPlaceholder('filtering term comma-separated, ID><=value')
Expand Down Expand Up @@ -1396,6 +1414,28 @@ function Layout (props) {
onChange={handleChangeAminoacid}
></input>
</div>
<div>
<label className='labelVariants'>
Variant min. length:
</label>
<input
className='inputVariants'
type='text'
value={variantMinLength}
onChange={handleChangeVariantMinLength}
></input>
</div>
<div>
<label className='labelVariants'>
Variant max. length:
</label>
<input
className='inputVariants'
type='text'
value={variantMaxLength}
onChange={handleChangeVariantMaxLength}
></input>
</div>
<div className='DivButtonVariants'>
<input
className='buttonVariants'
Expand Down Expand Up @@ -1440,6 +1480,28 @@ function Layout (props) {
onChange={handleChangeVariantType2}
></input>
</div>
<div>
<label className='labelVariants'>
Variant min. length:
</label>
<input
className='inputVariants'
type='text'
value={variantMinLength2}
onChange={handleChangeVariantMinLength2}
></input>
</div>
<div>
<label className='labelVariants'>
Variant max. length:
</label>
<input
className='inputVariants'
type='text'
value={variantMaxLength2}
onChange={handleChangeVariantMaxLength2}
></input>
</div>
<div className='DivButtonVariants'>
<input
className='buttonVariants'
Expand Down

0 comments on commit 62fab25

Please sign in to comment.