to_be_renamed
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
to_be_renamed [2018/10/22 19:15] – [Roary] hyjeong | to_be_renamed [2022/06/18 13:12] (current) – [Roary] hyjeong | ||
---|---|---|---|
Line 45: | Line 45: | ||
{{: | {{: | ||
- | 일반적으로 pan genome을 계산하기 위하여 all-against-all BLAST를 거치므로 대단히 많은 시간이 소요되지만, | + | 일반적으로 pan genome을 계산하기 위하여 all-against-all BLAST를 거치므로 대단히 많은 시간이 소요되지만, |
설치가 약간 까다로운 편이지만([[https:// | 설치가 약간 까다로운 편이지만([[https:// | ||
Line 51: | Line 51: | ||
$ roary *.gff # core gene의 multiple sequence alignment를 하지 않고 pan genome 분석(기본 동작) | $ roary *.gff # core gene의 multiple sequence alignment를 하지 않고 pan genome 분석(기본 동작) | ||
$ roary -e --mafft -p 8 -i 90 -f output_dir -z *.gff # 본문 설명 참조 | $ roary -e --mafft -p 8 -i 90 -f output_dir -z *.gff # 본문 설명 참조 | ||
- | 세 번째 명령에서는 core gene의 alignment를 mafft로 실행하고(-e --mafft) 8 개의 thread를 사용하며(-p 8) blast percent identity cutoff를 90%(기본은 95%)로 한다는 것(-i 90)이다. -o output_dir을 설정하지 않으면 현재 디렉토리에 결과 파일을 작성한다. -e라고만 하면 prank를 사용하여 core gene multiFASTA alignment를 하게 되는데 codon-aware alignment를 하므로 mafft보다는 정확하지만 느리다. -z는 중간 결과 파일(alignment)을 output_dir/ | + | 세 번째 명령에서는 core gene의 alignment를 mafft로 실행하고(-e --mafft) 8 개의 thread를 사용하며(-p 8) blast percent identity cutoff를 90%(기본은 95%)로 한다는 것(-i 90)이다. -e 옵션만 주면 PRANK에 의한 core gene alignment를 실시한다(좀 느리다). -o output_dir을 설정하지 않으면 현재 디렉토리에 결과 파일을 작성한다. -e라고만 하면 prank를 사용하여 core gene multiFASTA alignment를 하게 되는데 codon-aware alignment를 하므로 mafft보다는 정확하지만 느리다. -z는 중간 결과 파일(alignment)을 output_dir/ |
=== Input file에 대한 주의사항 === | === Input file에 대한 주의사항 === | ||
Line 57: | Line 57: | ||
{{: | {{: | ||
- | 그러므로 PGAP annotation file은 그대로 사용하지 말고 [[fillAccession.pl]]으로 처리하여 accession을 채운 뒤 GFF로 전환해야 한다. | + | 그러므로 PGAP annotation file은 그대로 사용하지 말고 [[fillAccession.pl]]으로 처리하여 accession을 채운 뒤 GFF로 전환해야 한다. |
+ | |||
+ | 또한 RAST server에서 export한 GFF3 파일도 Roary에서 그대로 쓰일 수가 없다. 왜냐하면 염기서열이 뒷부분에 있지 않기 때문이다. 뿐만 아니라 gene 없이 cds feature만 있다는 것도 문제가 된다. 몇 가지를 테스트해 본 경험으로 가장 바람직한 것은, RAST에서 export한 GFF3 file에서 CDS feature만 골라낸 것 + '## | ||
+ | |||
+ | Roary를 실행하면 십중팔구는 다음과 같은 메시지와 함께 GFF 파일을 수정하여 fixed_input_files 디렉토리에 복사하게 된다. 나중에 query_pan_genome 스크립트로 GFF 파일을 대상으로 하는 작업을 할 때에는 수정된 것을 써야 한다. | ||
+ | 2021/06/30 15:53:28 Input file contains duplicate gene IDs, attempting to fix by adding a unique suffix, new GFF in the fixed_input_files directory: | ||
=== Output files === | === Output files === | ||
{{: | {{: | ||
== 결과 파일에 대한 설명 == | == 결과 파일에 대한 설명 == | ||
- | * gene_presence_absence.csv: | + | |
- | * core_gene_alignment.aln: | + | |
- | * clustered_proteins: | + | |
* *.Rtab: Tab Files for producing graphs in R | * *.Rtab: Tab Files for producing graphs in R | ||
* *embl: EMBL files for visualizing presence and absence of genes | * *embl: EMBL files for visualizing presence and absence of genes | ||
* accessory_binary_genes.fa.newick: | * accessory_binary_genes.fa.newick: | ||
- | * pan_genome_reference.fa: | + | |
- | * pangenome_sequences (directory): | + | |
Roary에서는 accessory gene의 여부를 이용한 binary tree만을 만들어 주므로, core gene alignment에서 phylogenetic tree를 작성하려면 FastTree 등의 프로그램을 직접 돌려야 한다.계산 시간을 줄이려면 [[https:// | Roary에서는 accessory gene의 여부를 이용한 binary tree만을 만들어 주므로, core gene alignment에서 phylogenetic tree를 작성하려면 FastTree 등의 프로그램을 직접 돌려야 한다.계산 시간을 줄이려면 [[https:// | ||
$ FastTree –nt –gtr core_gene_alignment.aln > my_tree.newick | $ FastTree –nt –gtr core_gene_alignment.aln > my_tree.newick | ||
Line 77: | Line 82: | ||
=== Command line tool의 사용법 === | === Command line tool의 사용법 === | ||
- | 테스트를 해 보았는데 그 동작이 완벽한 것 같지는 않다. | + | 원본 GFF 파일이 아니라 roary가 수정한 것(fixed_input_files/ |
$ query_pan_genome -h # for help | $ query_pan_genome -h # for help | ||
$ query_pan_genome -a union *.gff # 결과물: pan_genome_results | $ query_pan_genome -a union *.gff # 결과물: pan_genome_results | ||
- | $ query_pan_genome -a intersection *.gff # 결과물: pan_genome_results | + | $ query_pan_genome -a intersection *.gff # 결과물: pan_genome_results |
# difference | # difference | ||
# complement | # complement | ||
Line 92: | Line 97: | ||
{{ : | {{ : | ||
+ | === Strain-specific gene 찾기 === | ||
+ | R에서 gene_presence_absence.Rtab과 gene_presence_absence.csv 두 파일을 다루면 된다. 다음의 사례에서는 Lb_1-46 균주에서 특이적인 유전자의 id를 추출하는 사례를 보여준다. Lb_1-46은 데이터프레임으로 읽어들이면 Lb_1.46으로 바뀌는 것에 유의해라. 구글링을 잘 하면 이를 원래 이름 그대로 유지하는 방법이 있다([[https:// | ||
+ | > dat = read.table(" | ||
+ | > dat$Lb_1.46 | ||
+ | > dat.s = subset(dat, rowSums(as.matrix(dat))==1) | ||
+ | > Lb.s = dat.s[which(dat.s$Lb_1.46==1), | ||
+ | > Lb.s.genes = rownames(Lb.s) | ||
+ | > dat.2 = read.table(" | ||
+ | > dat.2$Lb_1.46 | ||
+ | > dat.f = dat.2[which(rownames(dat.2) %in% Lb.s.genes), | ||
+ | > dat.f$Lb_1.46 | ||
+ | > write.table(dat.f$Lb_1.46," | ||
=== 기타 해결할 문제 === | === 기타 해결할 문제 === | ||
결과 파일을 열어보면 일부 단백질의 ID가 변형되어 쓰인 것을 알 수 있다. 즉 원본 annotation file에서 MT_RS20470라는 locus tag을 갖는 유전자가 " | 결과 파일을 열어보면 일부 단백질의 ID가 변형되어 쓰인 것을 알 수 있다. 즉 원본 annotation file에서 MT_RS20470라는 locus tag을 갖는 유전자가 " | ||
+ | |||
+ | Prokka에서 만든 gff3 파일을 사용하였더니 tRNA gene을 결과물 중에 포함시키는 현상이 가끔 관찰된다. | ||
=== Roary 이후 개발된 프로그램 === | === Roary 이후 개발된 프로그램 === | ||
Line 139: | Line 158: | ||
LS-BSR의 간단한 사용법을 알아보자. genome sequence 파일은 확장자가 .fasta가 아니면 작동을 하지 않는다. markers.fasta는 항상 유전자 | LS-BSR의 간단한 사용법을 알아보자. genome sequence 파일은 확장자가 .fasta가 아니면 작동을 하지 않는다. markers.fasta는 항상 유전자 | ||
| | ||
- | | + | |
# gene screen method (peptides in interest are ready) | # gene screen method (peptides in interest are ready) | ||
- | # / | ||
$ python path_to_LS-BSR/ | $ python path_to_LS-BSR/ | ||
# de novo gene prediction method | # de novo gene prediction method | ||
$ python path_to_LS-BSR/ | $ python path_to_LS-BSR/ | ||
- | gene prediction method에서는 prodigal로 유전자를 예측한 뒤 단백질로 번역한 다음 usearch로 클러스터링(default: | + | 계산이 끝나면 현 디렉토리에 markers.fasta가 번역된 genes.pep 파일이 생긴다. |
to_be_renamed.1540203318.txt.gz · Last modified: (external edit)