-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:h3abionet/h3agwas
- Loading branch information
Showing
28 changed files
with
642 additions
and
193 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<img src="auxfiles/H3ABioNetlogo2.jpg"/> | ||
|
||
|
||
# Trouble shooting and possible problems : | ||
* clump function, if rs id between plink file and summary statistics,result not completed | ||
* ssee replication and finemapping pipeline | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env Rscript | ||
library("optparse") | ||
|
||
option_list = list( | ||
make_option(c("--data"), type="character", default=NULL, | ||
help="dataset file name", metavar="character"), | ||
make_option(c( "--ind_vcf"), type="character", default=NULL, | ||
help="dataset file name", metavar="character"), | ||
make_option(c("--out"), type="character", | ||
help="list of genes ", metavar="character") | ||
); | ||
|
||
opt_parser = OptionParser(option_list=option_list); | ||
opt = parse_args(opt_parser); | ||
|
||
Data<-read.table(opt[['data']], header=T) | ||
ndata<-names(Data) | ||
listind<-read.table(opt[['ind_vcf']]) | ||
Data$FIDIID<-paste(Data[,1], Data[,2],sep='_') | ||
|
||
if(any(listind$V1 %in% listind[,1]) & any(listind$V2 %in% listind[,1])){ | ||
write.table(Data[,ndata], file=opt[['out']], row.names=F, col.names=T, sep='\t', quote=F) | ||
write.table(Data[,c(1,2,1,2)], file=paste(opt[['out']],'_updateid',sep=''), col.names=F, sep='\t', quote=F) | ||
}else if(any(listind$V1 %in% Data$FIDIID)){ | ||
write.table(Data[,c('FID','IID','FIDIID','FIDIID')], file=paste(opt[['out']],'_updateid',sep=''), col.names=F, sep='\t', quote=F, row.names=F) | ||
Data$FID<-Data$FIDIID | ||
Data$IID<-Data$FIDIID | ||
write.table(Data[,ndata], file=opt[['out']], row.names=F, col.names=T, sep='\t', quote=F) | ||
}else{ | ||
cat(Data$FID) | ||
cat('\n') | ||
cat(Data$IID) | ||
cat('no same individual between vcf and pheno file\nexit\n') | ||
q('n', 2) | ||
} | ||
|
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env python3 | ||
import sys | ||
import re | ||
args = sys.argv | ||
print(args) | ||
if len(sys.argv)==0 : | ||
filegenes="/spaces/jeantristan/GWAS/Ressource/gencode.v19.annotation.gtf" | ||
else : | ||
filegenes=args[1] | ||
|
||
readgene=open(sys.argv[1]) | ||
writegene=open("gencode.v19.genes", 'w') | ||
writegene.write("\t".join(["CHR", "Type","BEGIN", "END","GENE"])+'\n') | ||
patrn='gene_name' | ||
for line in readgene : | ||
if line[0] != "#" : | ||
splline=line.split('\t') | ||
#['chr1', 'ENSEMBL', 'CDS', '6186632', '6186806', '.', '-', '0', 'gene_id "ENSG00000116254.13"; transcript_id "ENST00000378021.1"; gene_type "protein_coding"; gene_status "KNOWN"; gene_name "CHD5"; transcript_type "protein_coding"; transcript_status "KNOWN"; transcript_name "CHD5-201"; exon_number 26; exon_id "ENSE00003551672.1"; level 3; protein_id "ENSP00000367260.1"; tag "basic"; havana_gene "OTTHUMG00000000952.6";\n']^C | ||
if splline[2]=='CDS' or splline[2]=='gene' : | ||
tmp=splline[8].split(';') | ||
resgene=[x for x in tmp if patrn in x ] | ||
if len(resgene)> 0: | ||
resgene=resgene[0].replace(patrn, '').replace(' ','').replace('"',"") | ||
chro=resgene[0].replace('chr','') | ||
writegene.write("\t".join([chro, splline[2], splline[3], splline[4], resgene])+'\n') | ||
|
||
writegene.close() | ||
readgene.close() | ||
|
Oops, something went wrong.