Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| openjdk | |
| ca-certificates | |
| rbenv | |
| git-lfs | |
| samtools | |
| sqlite | |
| htop | |
| htslib | |
| kubernetes | |
| shai |
This file contains hidden or 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
| [ | |
| { | |
| "type": "escape", | |
| "width": 64, | |
| "align": "left" | |
| }, | |
| { "type": "brightnessDown", "width": 62, "bordered": false, "align": "left" }, | |
| { "type": "brightnessUp", "width": 62, "bordered": false, "align": "left" }, | |
| { | |
| "type": "play", |
This file contains hidden or 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
| def vcf_to_df(path): | |
| def read_comments(f): | |
| fields = {} | |
| description = {} | |
| for l in f: | |
| l = l.decode("utf-8") | |
| if l.startswith('##'): | |
| if 'FORMAT' in l[:20]: | |
| res = l.split('ID=')[1].split(',')[0] | |
| desc = l.split('Description=')[1][:-2] |
This file contains hidden or 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
| bubble{ | |
| render{ | |
| <View id=top | |
| onLayout={(event) => this.props.getHeight(event.nativeEvent.layout.height+this.state.posY) | |
| }} | |
| weave{ | |
| // One line in one branch (example of 1 message) | |
| updateDisplayList(newcurrent){ |
This file contains hidden or 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
| SMs= {} | |
| for i, bam in enumerate(versions): | |
| print(i,end='\r') | |
| data = os.popen('export GCS_OAUTH_TOKEN=`gcloud auth application-default print-access-token` && samtools view -H '+bam +' | grep "^@RG"') | |
| if data == signal.SIGINT: | |
| print('Awakened') | |
| break | |
| else: | |
| res = data.read() | |
| SMs[bam] = re.findall("(?<=\tSM:).+?\t", res)[0] |
This file contains hidden or 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
| for k, rowinfo in samples.iterrows(): | |
| # check for broken bam files; if broken, then remove from consideration | |
| # need to check for broken filepaths before checking if the sample is in Terra so that we don't add a broken file path for a new participant | |
| pdb.set_trace() | |
| filepath = rowinfo[extract['bam']] | |
| sample_to_check = os.popen('gsutil -m ls -al ' + filepath).read().split('\n') | |
| if sample_to_check == ['']: | |
| # this bam file doesn't exist at this filepath | |
| print("The bam file path we have in data workspace is broken, so we will remove it from consideration:\n " + str(filepath)) | |
| broken_bams += [filepath] |
This file contains hidden or 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
| def accessAndChange(func, wmfrom, wmto=None, name index_func=None): | |
| data = {} | |
| try: | |
| a = wmfrom.get_participants() | |
| data.update({'participants': a}) | |
| except: | |
| print('no participants') | |
| try: | |
| a = wmfrom.get_samples() | |
| data.update({'samples': a}) |
This file contains hidden or 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
| command <<< | |
| # Function call depends on whether sample has match normal or not | |
| if [ ${normal_id} != NA ]; then | |
| echo "Filtering variants with match normal" | |
| match_normal_variants="--match_normal_filtered_variants ${match_normal_variants}" | |
| else | |
| echo "Filtering variants with no match normal" | |
| fi | |
| python /TSCA/filter_variants.py \ | |
| --sample_type Tumor \ |
This file contains hidden or 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
| cat urls.txt | parallel -j 10 'curl -L -s {} | gsutil cp - "gs://BUCKETNAME/GCPFOLDER"$(echo {} | cut -d \/ -f -1)' | |
| #need to have parallel installed (brew, apt) |