How to Use segemehl

Source: Internet
Author: User

Setp 1. Create an index

./Segemehl. X-x Chr. ctidx-y Chr. gaidx-D Chr. Fa-f [1 or 2]

Setp 2. Generate a SAM File

./Segemehl. X-I Chr. ctidx-J Chr. gaidx-D Chr. Fa-Q myreads. Fa-O mymap. Sam-f [1 or 2]

Setp 3. Further analysis using the callmajormethyl. pl script

Samtools view-HS target. Sam | awk '/^ @/|/XB: Z: f .. CT/'> tmp.tar get. Ct. Sam

Samtools view-BS tmp.tar get. Ct. Sam> tmp.tar get. Ct. Bam

Samtools sort tmp.tar get. Ct. Bam tmp.tar get. Ct. Sorted

Samtools mpileup-BF Chr. Fa tmp.tar get. Ct. Sorted. Bam> tmp.tar get. Test

Perl callmajormethyl. pl-S 1-I tmp.tar get. Test-O tmp.target.test.txt

========================================================== ======================================

Samtools mpileup needs to be executed cyclically in setp3, and shell script is required

#! /Bin/bash
If [$ UID-Ne 0];
Then
Echo "please run as root"
Exit 1
Fi
# Define the path of the. Fa File
Fa_path = $1
# Define the path of the. Sam File
Sam_path = $2
# Match the required entries in the SAM File
Samtools view-HS $ {sam_path} | awk '/^ @/|/XB: Z: f .. CT/'> TMP. Ct. Sam
# Convert a SAM file to a BAM File
Samtools view-bs tmp. Ct. Sam> TMP. Ct. Bam
# Process the BAM file sort
Samtools sort TMP. Ct. Bam TMP. Ct. Sorted
# Compare different chromosomes in the FA folder
For fa in $ {fa_path} *. Fa; do
Name =$ {fa ##*/}
Samtools mpileup-BF $ {fa} TMP. Ct. Sorted. Bam> TMP
Perl/home/dklv/segemehl/callmajormethyl. pl-S 1-I TMP-O too many name1_.txt
Echo "$ {name} has been processed"
Done
# Delete temporary files
Rm-rf tmp *
Rm-RF $ {fa_path} *. Fai
Echo ""
Echo ""
Echo ""
Echo "============================================== ===="
Echo "all. Fa file have been processed"
Echo ""

 

========================================================== ============

Appendix 1 segemehl Manual

Http://pan.baidu.com/s/1nt5bJXf

Appendix 2 segemehl project Homepage

Http://www.bioinf.uni-leipzig.de/Software/segemehl/

How to Use segemehl

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.