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

Allow URLs to be inputted as BED files #329

Merged
merged 16 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
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
57 changes: 31 additions & 26 deletions exampleData/chunk-ref-1-20/chunk.vg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VG¶
VGó

GT
d
Expand Down Expand Up @@ -41,32 +41,35 @@ d
d
`CAATTCTCCTGTCTCTGCCTCCTGAGTAGCTGGAATTACAGGCACATGCCATCACACCCAGCTAATTTTTGTATTTTTAGTAGAGACGGGGGTTTC
d
`ACAATGTTGGCCAGGCTGCTCTGGAACTCCTGACCTCAGGTGATCCACCCACCTTGGCCTCCCAAAGTGCTGGGATTACAGGCGTGAGCCACTGCA  
`ACAATGTTGGCCAGGCTGCTCTGGAACTCCTGACCTCAGGTGATCCACCCACCTTGGCCTCCCAAAGTGCTGGGATTACAGGCGTGAGCCACTGCA

CCTGG  

    
GI262359905[79269]
 ``(
 ``(
 ``(
 ``(
 ``(
 ``(
 ``(
 ``(
 ``( 
 ``(
    ä
GI262359905[79264]
 (
 ``(
 ``(
 ``(
 ``(
 ``(
 ``(
 ``(
 ``( 
 ``(

 ``( 
 ``( 
 ``( 

``( 
 ``(
 ``(
 ``(
 ``(
 ``(
 ``(
 ``(
 ``(¶
``(
 ``(
 ``(
 ``(
 ``(
 ``(
 ``(
 ``(
 ``(Ä
GI528476558[0]
(
``(
Expand All @@ -90,7 +93,8 @@ d
``(
``(
``(
``(«
``(
(¹
ref
(
``(
Expand All @@ -114,4 +118,5 @@ d
``(
``(
``(
``(
``(
(
Expand Down
6 changes: 6 additions & 0 deletions exampleData/chunk-ref-1-20/chunk_contents.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
chunk-1_0_ref_0_1926.gam
chunk.vg
chunk_0_ref_0_1926.annotate.txt
chunk_0_ref_0_1926.gam
regions.tsv
tracks.json
2 changes: 1 addition & 1 deletion exampleData/chunk-ref-1-20/regions.tsv
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ref 0 1922 chunk-ref-1-20/chunk_0_ref_0_1921.gam chunk-ref-1-20/chunk_0_ref_0_1921.annotate.txt
ref 0 1927 chunk-ref-1-20/chunk_0_ref_0_1926.gam chunk-ref-1-20/chunk_0_ref_0_1926.annotate.txt
8 changes: 7 additions & 1 deletion scripts/prepare_chunks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,10 @@ JSON_STRING=$(jq -n \
--argjson gam_files "$GAM_FILES_JSON" \
'$ARGS.named' )

printf "%s\n" "$JSON_STRING" > $OUTDIR/tracks.json
printf "%s\n" "$JSON_STRING" > $OUTDIR/tracks.json


for file in `ls $OUTDIR/`
do
printf "$file\n" >> $OUTDIR/chunk_contents.txt
Comment on lines +60 to +63
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have our own loop just to stop chunk_contents.txt from listing itself?

done
12 changes: 8 additions & 4 deletions src/components/SelectionDropdown.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { Component } from "react";
import PropTypes from "prop-types";
import Select from "react-select";
//import Select from "react-select";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//import Select from "react-select";

import CreatableSelect from 'react-select/creatable';

/**
* A searchable selection dropdown component.
Expand Down Expand Up @@ -63,13 +64,16 @@ export class SelectionDropdown extends Component {
};

return (
<Select
<CreatableSelect
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has everywhere we use this been updated to cope with/disallow creating novel options?

getNewOptionData={(inputValue, optionLabel) => ({
label: optionLabel,
value: inputValue,
})}
id={this.props.id}
inputId={this.props.inputId}
className={this.props.className}
value={
dropdownOptions.find((option) => option.value === this.props.value) ||
{}
dropdownOptions.find((option) => option.value === this.props.value) || {label: this.props.value , value: this.props.value}
}
styles={styles}
isSearchable={true}
Expand Down
1 change: 1 addition & 0 deletions src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"vgPath": "",
"dataPath": "./exampleData",
"internalDataPath": "./exampleData/internal/",
"tempDirPath": "./temp",

"defaultHaplotypeColorPalette" : {
"mainPalette": "ygreys",
Expand Down
Loading
Loading